Difference between revisions of "Extensions.File.CreateTempDirectory"

From emotive
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:OTX '''CreateTempDirectory'''}}Category:File == Classification == {{ClassificationActivity | CreateTempDirectory | UPDATING... | Term | Extensions.Fil...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''CreateTempDirectory'''}}[[Category:File]]
 
{{DISPLAYTITLE:OTX '''CreateTempDirectory'''}}[[Category:File]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | CreateTempDirectory | UPDATING... | [[Term]] | [[Extensions.File|OTX File extension]] | UPDATING... | UPDATING... | UPDATING... }}
+
{{ClassificationActivity | CreateTempDirectory| Creates a new unique temporary directory | [[Term]] | [[Extensions.File|OTX File extension]] | [[Extensions.File#Terms|File related Terms]]| [[Extensions.File.FileSaveException|FileSaveException]]| -|}}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
UPDATING...<!--
 
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.CloseComChannel(ComChannelVariable);
+
StringTerm File.CreateTempDirectory();
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== Description ==
 
== Description ==
UPDATING...<!--
+
The '''CreateTempDirectory''' activity creates a new unique temporary directory and returns the URI of the path, which is either absolute or relative to OTX home. The OTX runtime environment has to deliver such directory and has to ensure that the user has read and write access to the content of that directory. After finishing the execution of the OTX runtime, the temporary directory will be deleted automatically with all its contents.
OTX CloseComChannel activity is used for the [[Diagnosis Runtime System]] to announce that an open communication channel that all relevant resources can be released and closed.
+
 
{{ComChannelMemoryUsageNote}}
+
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.String|String]] | The URI of the path of the new unique temporary directory}}
{{Important|Please note that the use of a shared '''ComChannel''' can bring the OTX runtime system in an undefined state and that is this case is not validated at design time!}}
 
-->
 
  
 
== Properties ==
 
== Properties ==
UPDATING...<!--
+
* NONE
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertie1| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Variable]] | - | [1] | Communication Channel (Control unit).}}
 
|}
 
-->
 
  
 
== OTL Examples ==
 
== OTL Examples ==
UPDATING...<!--
 
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.ComChannel myComCannel;
+
/// Local Declarations
 +
 
 +
String String1 = "";
  
myComCannel = DiagCom.GetComChannel("DiagnosticsCan_ECU_1", null, false);
+
/// Flow
  
// Code example using the variable myComChannel
+
String1 = File.CreateTempDirectory();
// ...
 
DiagCom.CloseComChannel(myComCannel);</syntaxhighlight>
 
 
</syntaxhighlight>
 
</syntaxhighlight>
-->
 
  
 
== See also ==
 
== See also ==
UPDATING...
+
<!--[[Extensions.File.CreateTempDirectory|CreateTempDirectory]]<br/>-->
 +
[[Extensions.File.GetFilePath|GetFilePath]]<br/>
 +
[[Extensions.File.GetFilesFromDirectory|GetFilesFromDirectory]]<br/>
 +
[[Extensions.File.GetFileSize|GetFileSize]]<br/>
 +
[[Extensions.File.IsDirectory|IsDirectory]]<br/>
 +
[[Extensions.File.IsEndOfFileReached|IsEndOfFileReached]]<br/>
 +
[[Extensions.File.IsFile|IsFile]]<br/>
 +
[[Extensions.File.OpenFileForRead|OpenFileForRead]]<br/>
 +
[[Extensions.File.OpenFileForWrite|OpenFileForWrite]]<br/>
 +
[[Extensions.File.ReadBytes|ReadBytes]]<br/>
 +
[[Extensions.File.ReadFile|ReadFile]]<br/>
 +
[[Extensions.File.ReadLine|ReadLine]]

Latest revision as of 10:09, 2 November 2018

Classification

Name CreateTempDirectory
Short Description Creates a new unique temporary directory
Class Term
Extension OTX File extension
Group File related Terms
Exceptions FileSaveException
Checker Rules -
Standard Compliant Yes

OTL Syntax

StringTerm File.CreateTempDirectory();

Description

The CreateTempDirectory activity creates a new unique temporary directory and returns the URI of the path, which is either absolute or relative to OTX home. The OTX runtime environment has to deliver such directory and has to ensure that the user has read and write access to the content of that directory. After finishing the execution of the OTX runtime, the temporary directory will be deleted automatically with all its contents.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
String The URI of the path of the new unique temporary directory

Properties

  • NONE

OTL Examples

/// Local Declarations

String String1 = "";

/// Flow

String1 = File.CreateTempDirectory();

See also

GetFilePath
GetFilesFromDirectory
GetFileSize
IsDirectory
IsEndOfFileReached
IsFile
OpenFileForRead
OpenFileForWrite
ReadBytes
ReadFile
ReadLine