Last time I checked this was not possible, but Olivier said he planned to implement it. Has this happened?
Suddenly a bigger issue, because I cannot supress the endless trace of 'file not found' messages in the beta FREE version--the page with the option to suppress is unavailable. But there are reasons I need to check for existing files, even otherwise.
In the past, I have cabled out to the file lister module and back in, but I'd love to get it inline in my scripts while I'm refactoring, it's much cleaner.
get list of directory items via script
-
woodslanding
- Member
- Posts: 1327
- Contact:
get list of directory items via script
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
will be implemented in the next release.
Code: Select all
const DirectorySeparator : Char = {$IFDEF MSWINDOWS} '\'; {$ELSE} '/'; {$ENDIF}
const LineEnding = #13#10;
function GetApplicationPath:string; //give the absolute path of the current Usine's folder
procedure FindFiles(const Directory: String; Extensions: String; Recursive: Boolean; Result: TStringList); // [Extensions] can be a comma-text
procedure FindDirectories(const Directory: String; Recursive: Boolean; Result: TStringList);
function WriteFileContents(const FileName: String; const Text: String; Append: Boolean): Boolean;
function ReadFileContents(const FileName: String): String;
function CreateDirectory(const Directory: String): Boolean;
function ForceDirectories(const Directory: String): Boolean;
function DeleteDirectory(const Directory: String; OnlyChildren: Boolean): Boolean;
function DeleteFile(const FileName: String): Boolean;
function RenameFile(const OldFileName, NewFileName: String): Boolean;
function CopyFile(const SourceFileName, DestFileName: String; Overwrite: Boolean = False): Boolean;
function FileExists(const FileName: String): Boolean;
function DirectoryExists(const Directory: String): Boolean;
function FileAge(const FileName: String): Int32; overload;
function FileAge(const FileName: String; out FileDateTime: TDateTime): Boolean; overload;
function ExtractFilePath(const FileName: String): String;
function ExtractFileDrive(const FileName: String): String;
function ExtractFileName(const FileName: String): String;
function ExtractFileExt(const FileName: String): String;
function ExtractFileDir(const FileName: String): String;
function ExpandFileName(const FileName: String): String;
function ExtractRelativePath(const BaseName, DestName: String): String;
function IncludeTrailingPathDelimiter(const Path: String) : String;
function ExcludeTrailingPathDelimiter(const Path: String): String;
function IncludeTrailingBackslash(const Path: String) : String;
function ExcludeTrailingBackslash(const Path: String): String;
function IncludeLeadingPathDelimiter(const Path : String) : String;
function ExcludeLeadingPathDelimiter(const Path: String): String;
// for compatibility
function SubFileExt(filename:String):string;
function PathDelim:string; // returns '/' on MACOS, '\' on windows
procedure CreateDir(dir:String);
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
woodslanding
- Member
- Posts: 1327
- Contact:
Thanks, Senso, that's great!
Can someone explain the meaning of 'const' in these definitions? I've never encountered it in arguments to a method before this release.
EDIT: of course, as soon as I hit send, I think of a possibility... does it mean you can't change its value in the method body??
Can someone explain the meaning of 'const' in these definitions? I've never encountered it in arguments to a method before this release.
EDIT: of course, as soon as I hit send, I think of a possibility... does it mean you can't change its value in the method body??
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Code: Select all
Can someone explain the meaning of 'const' in these definitions?Olivier Sens
www.brainmodular.com
www.brainmodular.com
Who is online
Users browsing this forum: No registered users and 10 guests
