issie


FilesIO

Namespace: global

Nested types and modules

ModuleDescription
JsonHelpers

Functions and values

Function or valueDescription
askForExistingProjectPath()
Signature: unit -> string option

Ask the user to choose a project file, with a dialog window. Return the folder containing the chosen project file. Return None if the user exits withouth selecting a path.

askForNewProjectPath()
Signature: unit -> string option

Ask the user a new project path, with a dialog window. Return None if the user exits withouth selecting a path.

baseName(filePath)
Signature: filePath:string -> string
createEmptyDgmFile folderPath baseName
Signature: folderPath:string -> baseName:string -> unit

Create new empty diagram file. Automatically add the .dgm suffix.

dirName(filePath)
Signature: filePath:string -> string
pathJoin(args)
Signature: args:string [] -> string
removeFile folderPath baseName
Signature: folderPath:string -> baseName:string -> unit

Asyncronously remove file.

savePngFile folderPath baseName png
Signature: folderPath:string -> baseName:string -> png:'a -> unit
Type parameters: 'a

Save a PNG file (encoded base64, as from draw2d) Overwrite existing file if needed

saveStateToFile(...)
Signature: folderPath:string -> baseName:string -> (Component list * Connection list) -> unit

Save state to file. Automatically add the .dgm suffix.

tryCreateFolder(path)
Signature: path:string -> Result<unit,string>
tryLoadComponentsFromPath(folderPath)
Signature: folderPath:string -> Result<LoadedComponent list,string>

Try to load all diagram components from a file path. Return a string with error if not possible.

writeFile path data
Signature: path:string -> data:'b -> unit
Type parameters: 'b

Write utf8 encoded data to file. Create file if it does not exist.

writeFileBase64 path data
Signature: path:string -> data:'?8952 -> unit
Type parameters: '?8952

Write base64 encoded data to file. Create file if it does not exist.