-
Notifications
You must be signed in to change notification settings - Fork 15
Utilities
SUCC.Utilities
is a static class containing various utilities.
When you create a new DataFile
, you pass it the path of the file on disk. If you pass it an absolute (rooted) path, it will just use that path. Otherwise, the path will be relative to Utilities.DefaultPath
.
You can set a custom DefaultPath
if you like. See Version Differences for the default location of DefaultPath
in different versions of SUCC.
Test to see if a SUCC file exists on disk at a given path. You can pass this function a relative or absolute path, same as when creating a DataFile
.
In computer science, lots of things are standardized between different platforms. Unfortunately, line endings are not (yet) one of them. Utilities.LineEndingStyle
lets you control how SUCC saves newlines when writing files.
-
LineEndingStyle.Unix
:\n
-
LineEndingStyle.Windows
:\r\n
-
LineEndingStyle.PlatformDefault
(default): Windows style when on Windows, Unix style everywhere else.
Pass Utilities.AbsolutePath
the path of a file or directory. If the path is already absolute, it will be returned as-is. Otherwise, the function will return an absolute path with your supplied path relative to Utilities.DefaultPath
.
This is the same function DataFile
s use to determine what their location on disk should be.
All configuration files managed by SUCC have the file extension Utilities.FileExtension
. This field is read-only and will always return .succ
.
- Overview
- Installing
- Getting Started
- Advanced Usage
- File Logic
- Version Differences
- Contributing
- Projects Using SUCC