Copy files.
NOTE: Starting from version 5.0.4 accepts also StringList as first param
Source file list
Destination folder
Optional
addToDB: booleanTracks will be added to database
Optional
dontShowOverwritePrompt: booleanPrompt to overwrite won't be shown
Optional
dontShowErrors: booleanError log won't be shown
Promise is fulfilled when action is completed.
Copy/Move folder.
Folder to copy/move
Target folder where to copy/move
Optional
params: { Copy/Move parameters
Optional
all?: booleanOptional
db?: booleanOptional
move?: booleanOptional
recursive?: booleanCreates folder and returns as SharedFolder in Promise fullfillment
Path of the folder to create
Delete folder.
Folder to delete
To recycle bin
Optional
onlyEmpty: booleanOnly if the folder has no other non-media content
Optional
dontDeleteFromDB: booleanDeletes the content, but not from the MM database (leaving deadlinks there) -- Aadded in 5.0.4
Removes network resource
Gets tracklist from filenames list
List of filenames
Gets list of all supported audio extensions.
Rest
...params: any[]Gets list of track's folders.
Parent Folder ID
Collection ID
Gets list of drives (instances of SharedDrive)
NOTE: In version 5.0.3 and lower it returns Promise
, in 5.0.4+ it is the list directly
Gets file content or a specified portion
File path of the file
Optional
from: numberfrom position in bytes
Optional
to: numberto position in bytes
Gets file info like dateCreated, dateModified, dateAccessed, size as JSON
date values are in the ISO format, see app.filesystem.timestamp2DateTime and app.utils.dateTime2Timestamp for the conversion
File path of the file
promise with param fileInfo (JSON format)
var jsonInfo = await app.filesystem.getFileInfoAsync(track.path);
var info = JSON.parse( jsonInfo);
console.log( info.dateModified);
Returns the folder as SharedFolder object
Path of the folder to get
Optional
isTemporary: booleanGets list folders for given path as StringList
Gets list of inserted medias (e.g. inserted CDs) as instances of SharedDrive
Gets last scanned folders
Gets monitored folders
Gets list of network resources (list of SharedFolder instances)
Gets list of all supported playlist extensions.
Rest
...params: any[]Gets list of all supported video extensions.
Rest
...params: any[]Optional
callback?: (() => void)Load text from file.
full path to the file to load
Optional
params: { Object containing additional parameters.
Optional
encoding?: TextEncodingReturns the resource as SharedFolder object
Path of the resource to get
Process located files and update them in database.
List of located files
Alias of renameFilesAsync.
Rest
...params: any[]Move or copy list of files.
Starting from version 5.0.4 moves also non-media files and accepts also StringList as first param
Prior to version 5.0.4 the function was named just renameFiles
Source file list
Destination folder or dest. filename
Optional
params: { Object containing additional parameters. Possible properties are:
Optional
addDB?: booleanOptional
canOptional
changeOptional
move?: booleanSave text to file.
full path to the file to save
text to save
Optional
params: { Object containing additional parameters. Possible properties are:
Optional
append?: booleanOptional
encoding?: stringScan selected path for media files.
Paths to scan
Server containers to scan
Extensions to scan (comma separated).
Additional parameters
Scan selected tracks for their new location.
List of missing tracks
Sets file content for a specified portion of data
buffer data to write
File path of the file
Optional
from: numberfrom position in bytes (0 by default)
Sets file info like dateModified, readOnly
date values are in the ISO format, see app.filesystem.timestamp2DateTime and app.utils.dateTime2Timestamp for the conversion
NOTE: Introduced in 5.0.4
File path of the file
Params to be set in JSON format
result
app.filesystem.setFileInfoAsync( 'C:\\Temp\\file.txt', '{"dateModified":"2020-02-02 22:22:22", "readOnly":"true"}');
Sets last scanned folders
Filesystem operations. Access via the global
app.filesystem
.Filesystem