mirror of
https://github.com/supleed2/ELEC60015-HLP-CW.git
synced 2024-11-10 02:05:48 +00:00
355 lines
13 KiB
HTML
355 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title>FilesIO - issie</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<meta name="description" content=""/>
|
|
<meta name="author" content="tomcl"/>
|
|
|
|
<script src="https://code.jquery.com/jquery-1.8.0.js"></script>
|
|
<script src="https://code.jquery.com/ui/1.8.23/jquery-ui.js"></script>
|
|
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js"></script>
|
|
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>
|
|
|
|
<link type="text/css" rel="stylesheet" href="https://tomcl.github.io/issie//content/style.css" />
|
|
<script type="text/javascript" src="https://tomcl.github.io/issie//content/tips.js"></script>
|
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="masthead">
|
|
<ul class="nav nav-pills pull-right">
|
|
<li><a href="http://fsharp.org">fsharp.org</a></li>
|
|
</ul>
|
|
<h3 class="muted"><a href="https://tomcl.github.io/issie//index.html">issie</a></h3>
|
|
</div>
|
|
<hr />
|
|
<div class="row">
|
|
<div class="span9" id="main">
|
|
|
|
|
|
|
|
|
|
<h1>FilesIO</h1>
|
|
<p>
|
|
<span>Namespace: global</span><br />
|
|
</p>
|
|
<div class="xmldoc">
|
|
</div>
|
|
|
|
<!-- Render nested types and modules, if there are any -->
|
|
<h2>Nested types and modules</h2>
|
|
<div>
|
|
<table class="table table-bordered module-list">
|
|
<thead>
|
|
<tr><td>Module</td><td>Description</td></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="module-name">
|
|
<a href="filesio-jsonhelpers.html">JsonHelpers</a>
|
|
</td>
|
|
<td class="xmldoc">
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<h3>Functions and values</h3>
|
|
<table class="table table-bordered member-list">
|
|
<thead>
|
|
<tr><td>Function or value</td><td>Description</td></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '47', 47)" onmouseover="showTip(event, '47', 47)">
|
|
askForExistingProjectPath()
|
|
</code>
|
|
<div class="tip" id="47">
|
|
<strong>Signature:</strong> unit -> string option<br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L88-88" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>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.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '48', 48)" onmouseover="showTip(event, '48', 48)">
|
|
askForNewProjectPath()
|
|
</code>
|
|
<div class="tip" id="48">
|
|
<strong>Signature:</strong> unit -> string option<br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L104-104" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>Ask the user a new project path, with a dialog window.
|
|
Return None if the user exits withouth selecting a path.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '49', 49)" onmouseover="showTip(event, '49', 49)">
|
|
baseName(filePath)
|
|
</code>
|
|
<div class="tip" id="49">
|
|
<strong>Signature:</strong> filePath:string -> string<br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L33-33" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '50', 50)" onmouseover="showTip(event, '50', 50)">
|
|
createEmptyDgmFile folderPath baseName
|
|
</code>
|
|
<div class="tip" id="50">
|
|
<strong>Signature:</strong> folderPath:string -> baseName:string -> unit<br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L172-172" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>Create new empty diagram file. Automatically add the .dgm suffix.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '51', 51)" onmouseover="showTip(event, '51', 51)">
|
|
dirName(filePath)
|
|
</code>
|
|
<div class="tip" id="51">
|
|
<strong>Signature:</strong> filePath:string -> string<br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L34-34" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '52', 52)" onmouseover="showTip(event, '52', 52)">
|
|
pathJoin(args)
|
|
</code>
|
|
<div class="tip" id="52">
|
|
<strong>Signature:</strong> args:string [] -> string<br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L32-32" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '53', 53)" onmouseover="showTip(event, '53', 53)">
|
|
removeFile folderPath baseName
|
|
</code>
|
|
<div class="tip" id="53">
|
|
<strong>Signature:</strong> folderPath:string -> baseName:string -> unit<br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L142-142" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>Asyncronously remove file.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '54', 54)" onmouseover="showTip(event, '54', 54)">
|
|
savePngFile folderPath baseName png
|
|
</code>
|
|
<div class="tip" id="54">
|
|
<strong>Signature:</strong> folderPath:string -> baseName:string -> png:'a -> unit<br />
|
|
<strong>Type parameters:</strong> 'a </div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L161-161" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>Save a PNG file (encoded base64, as from draw2d)
|
|
Overwrite existing file if needed</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '55', 55)" onmouseover="showTip(event, '55', 55)">
|
|
saveStateToFile(...)
|
|
</code>
|
|
<div class="tip" id="55">
|
|
<strong>Signature:</strong> folderPath:string -> baseName:string -> (Component list * Connection list) -> unit<br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L166-166" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>Save state to file. Automatically add the .dgm suffix.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '56', 56)" onmouseover="showTip(event, '56', 56)">
|
|
tryCreateFolder(path)
|
|
</code>
|
|
<div class="tip" id="56">
|
|
<strong>Signature:</strong> path:string -> Result<unit,string><br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L131-131" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '57', 57)" onmouseover="showTip(event, '57', 57)">
|
|
tryLoadComponentsFromPath(folderPath)
|
|
</code>
|
|
<div class="tip" id="57">
|
|
<strong>Signature:</strong> folderPath:string -> Result<LoadedComponent list,string><br />
|
|
</div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L190-190" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>Try to load all diagram components from a file path.
|
|
Return a string with error if not possible.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '58', 58)" onmouseover="showTip(event, '58', 58)">
|
|
writeFile path data
|
|
</code>
|
|
<div class="tip" id="58">
|
|
<strong>Signature:</strong> path:string -> data:'b -> unit<br />
|
|
<strong>Type parameters:</strong> 'b </div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L155-155" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>Write utf8 encoded data to file.
|
|
Create file if it does not exist.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="member-name">
|
|
|
|
<code onmouseout="hideTip(event, '59', 59)" onmouseover="showTip(event, '59', 59)">
|
|
writeFileBase64 path data
|
|
</code>
|
|
<div class="tip" id="59">
|
|
<strong>Signature:</strong> path:string -> data:'?8952 -> unit<br />
|
|
<strong>Type parameters:</strong> '?8952 </div>
|
|
</td>
|
|
<td class="xmldoc">
|
|
<a href="https://github.com/tomcl/ISSIE/tree/master/src/Renderer/FilesIO.fs#L149-149" class="github-link">
|
|
<img src="../content/img/github.png" class="normal" />
|
|
<img src="../content/img/github-blue.png" class="hover" />
|
|
</a>
|
|
<p>Write base64 encoded data to file.
|
|
Create file if it does not exist.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
<div class="span3">
|
|
<ul class="nav nav-list" id="menu" style="margin-top: 20px;">
|
|
<li class="nav-header">issie</li>
|
|
<li class="divider"></li>
|
|
<li><a href="https://github.com/tomcl/ISSIE">Source Code</a></li>
|
|
<li><a href="https://tomcl.github.io/issie//release-notes.html">Release Notes</a></li>
|
|
<li><a href="https://tomcl.github.io/issie//contributing.html">Contributing</a></li>
|
|
|
|
<li class="nav-header">Documentation</li>
|
|
<li><a href="https://tomcl.github.io/issie//index.html">Introduction</a></li>
|
|
<li class="divider"></li>
|
|
<li><a href="https://tomcl.github.io/issie//community.html">Community</a></li>
|
|
|
|
<li class="nav-header">Reference</li>
|
|
<li><a href="https://tomcl.github.io/issie//reference/index.html">API Reference</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|