Header menu logo issie

FileUpdate Module

Functions and values

Function or value Description

activateBrowserSelection model dispatch

Full Usage: activateBrowserSelection model dispatch

Parameters:

Act on the row the project browser's keyboard selection is on: a project opens, an ordinary folder is entered - the same two things a click on that row does.

model : Model
dispatch : Msg -> unit

doActionWithSaveFileDialog name nextAction model dispatch arg5

Full Usage: doActionWithSaveFileDialog name nextAction model dispatch arg5

Parameters:
    name : string
    nextAction : Msg
    model : Model
    dispatch : Msg -> Unit
    arg4 : 'a

Returns: Unit

force either save of current file before action, or abort (closeProject is special case of this) In addition, if not aborting, save current lockstate of all files.

name : string
nextAction : Msg
model : Model
dispatch : Msg -> Unit
arg4 : 'a
Returns: Unit

fileCommand fc dispatch model

Full Usage: fileCommand fc dispatch model

Parameters:
Returns: Model * Cmd<'a>

Implement a command involving file operations from Update, with access to dispatch Invoked by message: `FileCommand(fc,dispatch)`. TODO - refactor to remove dispatch dependence

fc : FileCommandType
dispatch : Msg -> Unit
model : Model
Returns: Model * Cmd<'a>

forceCloseProject model dispatch

Full Usage: forceCloseProject model dispatch

Parameters:

Close current project, if any.

model : Model
dispatch : Msg -> unit

openChosenFolder path model dispatch

Full Usage: openChosenFolder path model dispatch

Parameters:
    path : string
    model : Model
    dispatch : Msg -> unit

Returns: Unit

Open the folder the user chose, which may not be a project. What is chosen has to be judged rather than assumed: it may be a project, a project whose marker has been lost, or a folder that merely contains projects. The last is not a refusal - it is where browsing continues. Mutually recursive with the browser, since the browser opens folders and an unopenable folder puts the browser back.

path : string
model : Model
dispatch : Msg -> unit
Returns: Unit

Type something to start searching.