File

Overview

File related methods

Location

  • Reference:
    • Elements.dll  .NET, .NET Core 6.0, .NET Standard 2.0
    • elements.jar  Cooper
    • Elements.fx  Island, ToffeeV2
    • libElements.fx  Toffee
  • Namespace: RemObjects.Elements.RTL
  • Platforms: .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, Toffee, ToffeeV2
  • Mapped to: String

 

AppendBinary .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Append binary data to the file aFilename.

 

class method AppendBinary(aFileName: String; Content: ImmutableBinary)

 

static void AppendBinary(String aFileName, ImmutableBinary Content)

 

static func AppendBinary(_ aFileName: String, _ Content: ImmutableBinary)

 

static void AppendBinary(String aFileName, ImmutableBinary Content)

 

Shared Sub AppendBinary(aFileName As String, Content As ImmutableBinary)

Parameters:

  • aFileName:
  • Content:

AppendBytes .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Append binary data to the file aFilename.

 

class method AppendBytes(aFileName: String; Content: array of Byte)

 

static void AppendBytes(String aFileName, Byte[] Content)

 

static func AppendBytes(_ aFileName: String, _ Content: Byte...)

 

static void AppendBytes(String aFileName, Byte[] Content)

 

Shared Sub AppendBytes(aFileName As String, Content As Byte())

Parameters:

  • aFileName:
  • Content:

AppendText .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Append text to end of the the file aFilename.

 

class method AppendText(aFileName: String; Content: String)

 

static void AppendText(String aFileName, String Content)

 

static func AppendText(_ aFileName: String, _ Content: String)

 

static void AppendText(String aFileName, String Content)

 

Shared Sub AppendText(aFileName As String, Content As String)

Parameters:

  • aFileName:
  • Content:

CopyTo (not nullable Folder, not nullable String, Boolean): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Copy a file to another file.

 

method CopyTo(Destination: not nullable Folder; NewName: not nullable String; aCloneIfPossible: Boolean): not nullable File

 

File! CopyTo(Folder! Destination, String! NewName, Boolean aCloneIfPossible)

 

func CopyTo(_ Destination: Folder, _ NewName: String, _ aCloneIfPossible: Boolean) -> File

 

File CopyTo(Folder Destination, String NewName, Boolean aCloneIfPossible)

 

Function CopyTo(Destination As Folder, NewName As String, aCloneIfPossible As Boolean) As File

Parameters:

  • Destination:
  • NewName:
  • aCloneIfPossible:

CopyTo (not nullable File, Boolean): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Copy a file to another file.

 

method CopyTo(NewPathAndName: not nullable File; aCloneIfPossible: Boolean): not nullable File

 

File! CopyTo(File! NewPathAndName, Boolean aCloneIfPossible)

 

func CopyTo(_ NewPathAndName: File, _ aCloneIfPossible: Boolean) -> File

 

File CopyTo(File NewPathAndName, Boolean aCloneIfPossible)

 

Function CopyTo(NewPathAndName As File, aCloneIfPossible As Boolean) As File

Parameters:

  • NewPathAndName:
  • aCloneIfPossible:

CopyTo (not nullable Folder, not nullable String, Boolean): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0

 

method CopyTo(Destination: not nullable Folder; NewName: not nullable String; aCloneIfPossible: Boolean): not nullable File

 

File! CopyTo(Folder! Destination, String! NewName, Boolean aCloneIfPossible)

 

func CopyTo(_ Destination: Folder, _ NewName: String, _ aCloneIfPossible: Boolean) -> File

 

Function CopyTo(Destination As Folder, NewName As String, aCloneIfPossible As Boolean) As File

Parameters:

  • Destination:
  • NewName:
  • aCloneIfPossible:

CopyTo (not nullable File, Boolean): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0

 

method CopyTo(NewPathAndName: not nullable File; aCloneIfPossible: Boolean): not nullable File

 

File! CopyTo(File! NewPathAndName, Boolean aCloneIfPossible)

 

func CopyTo(_ NewPathAndName: File, _ aCloneIfPossible: Boolean) -> File

 

Function CopyTo(NewPathAndName As File, aCloneIfPossible As Boolean) As File

Parameters:

  • NewPathAndName:
  • aCloneIfPossible:

CopyTo (not nullable File, not nullable File, Boolean): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Copy a file to another file.

 

class method CopyTo(aFileName: not nullable File; NewPathAndName: not nullable File; aCloneIfPossible: Boolean): not nullable File

 

static File! CopyTo(File! aFileName, File! NewPathAndName, Boolean aCloneIfPossible)

 

static func CopyTo(_ aFileName: File, _ NewPathAndName: File, _ aCloneIfPossible: Boolean) -> File

 

static File CopyTo(File aFileName, File NewPathAndName, Boolean aCloneIfPossible)

 

Shared Function CopyTo(aFileName As File, NewPathAndName As File, aCloneIfPossible As Boolean) As File

Parameters:

  • aFileName:
  • NewPathAndName:
  • aCloneIfPossible:

DateCreated (nullable File): DateTime .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method DateCreated(aFileName: nullable File): DateTime

 

static DateTime DateCreated(File? aFileName)

 

// Toffee
static func DateCreated(_ aFileName: File) -> DateTime
// ToffeeV2
static func DateCreated(_ aFileName: File?) -> DateTime

 

Shared Function DateCreated(aFileName As File?) As DateTime

Parameters:

  • aFileName:

DateCreated Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Date this file was created.

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

DateTime DateCreated { __get; }

 

ReadOnly Property DateCreated() As DateTime

DateCreated .NET, .NET Core 6.0, .NET Standard 2.0

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

ReadOnly Property DateCreated() As DateTime

DateModified (nullable File): DateTime .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method DateModified(aFileName: nullable File): DateTime

 

static DateTime DateModified(File? aFileName)

 

// Toffee
static func DateModified(_ aFileName: File) -> DateTime
// ToffeeV2
static func DateModified(_ aFileName: File?) -> DateTime

 

Shared Function DateModified(aFileName As File?) As DateTime

Parameters:

  • aFileName:

DateModified Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Date this file was modified.

 

property DateModified: DateTime read write;

 

DateTime DateModified { get; set; }

 

var DateModified: DateTime { get{} set{} }

 

DateTime DateModified { __get; __set; }

 

Property DateModified() As DateTime

DateModified .NET, .NET Core 6.0, .NET Standard 2.0

 

property DateModified: DateTime read write;

 

DateTime DateModified { get; set; }

 

var DateModified: DateTime { get{} set{} }

 

Property DateModified() As DateTime

Delete Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Delete this file.

 

method Delete

 

void Delete()

 

func Delete()

 

void Delete()

 

Sub Delete()

Delete (not nullable File) .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Delete this file.

 

class method Delete(aFileName: not nullable File)

 

static void Delete(File! aFileName)

 

static func Delete(_ aFileName: File)

 

static void Delete(File aFileName)

 

Shared Sub Delete(aFileName As File)

Parameters:

  • aFileName:

Exists .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, ToffeeV2

Check if a file exists.

 

method Exists: Boolean

 

Boolean Exists()

 

func Exists() -> Boolean

 

Boolean Exists()

 

Function Exists() As Boolean

Exists Exists(): Boolean  virtual Toffee

 

func Exists(Exists ) -> Boolean

Parameters:

  • :

Exists (nullable File): Boolean .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Check if a file exists.

 

class method Exists(aFileName: nullable File): Boolean

 

static Boolean Exists(File? aFileName)

 

// Toffee
static func Exists(_ aFileName: File) -> Boolean
// ToffeeV2
static func Exists(_ aFileName: File?) -> Boolean

 

static Boolean Exists(File aFileName)

 

Shared Function Exists(aFileName As File?) As Boolean

Parameters:

  • aFileName:

Extension

Returns the extension including .

 

property Extension: not nullable String read;

 

String! Extension { get; }

 

var Extension: String { get{} }

 

String Extension { __get; }

 

ReadOnly Property Extension() As String

FullPath

Returns the full path to this file.

 

property FullPath: not nullable String read;

 

String! FullPath { get; }

 

var FullPath: String { get{} }

 

String FullPath { __get; }

 

ReadOnly Property FullPath() As String

IsReadOnly .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, ToffeeV2

 

method IsReadOnly: Boolean

 

Boolean IsReadOnly()

 

func IsReadOnly() -> Boolean

 

Boolean IsReadOnly()

 

Function IsReadOnly() As Boolean

IsReadOnly IsReadOnly(): Boolean  virtual Toffee

 

func IsReadOnly(IsReadOnly ) -> Boolean

Parameters:

  • :

IsReadOnly (nullable File): Boolean .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method IsReadOnly(aFileName: nullable File): Boolean

 

static Boolean IsReadOnly(File? aFileName)

 

// Toffee
static func IsReadOnly(_ aFileName: File) -> Boolean
// ToffeeV2
static func IsReadOnly(_ aFileName: File?) -> Boolean

 

static Boolean IsReadOnly(File aFileName)

 

Shared Function IsReadOnly(aFileName As File?) As Boolean

Parameters:

  • aFileName:

Move (not nullable Folder, not nullable String): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

method Move(DestinationFolder: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Move(Folder! DestinationFolder, String! NewName)

 

func Move(_ DestinationFolder: Folder, _ NewName: String) -> File

 

File Move(Folder DestinationFolder, String NewName)

 

Function Move(DestinationFolder As Folder, NewName As String) As File

Parameters:

  • DestinationFolder:
  • NewName:

Move (not nullable File): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

method Move(NewPathAndName: not nullable File): not nullable File

 

File! Move(File! NewPathAndName)

 

func Move(_ NewPathAndName: File) -> File

 

File Move(File NewPathAndName)

 

Function Move(NewPathAndName As File) As File

Parameters:

  • NewPathAndName:

Move (not nullable Folder, not nullable String): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0

 

method Move(DestinationFolder: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Move(Folder! DestinationFolder, String! NewName)

 

func Move(_ DestinationFolder: Folder, _ NewName: String) -> File

 

Function Move(DestinationFolder As Folder, NewName As String) As File

Parameters:

  • DestinationFolder:
  • NewName:

Move (not nullable File): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0

 

method Move(NewPathAndName: not nullable File): not nullable File

 

File! Move(File! NewPathAndName)

 

func Move(_ NewPathAndName: File) -> File

 

Function Move(NewPathAndName As File) As File

Parameters:

  • NewPathAndName:

Move (not nullable File, not nullable File): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

class method Move(aFileName: not nullable File; NewPathAndName: not nullable File): not nullable File

 

static File! Move(File! aFileName, File! NewPathAndName)

 

static func Move(_ aFileName: File, _ NewPathAndName: File) -> File

 

static File Move(File aFileName, File NewPathAndName)

 

Shared Function Move(aFileName As File, NewPathAndName As File) As File

Parameters:

  • aFileName:
  • NewPathAndName:

Name

Returns the name of this file, without path.

 

property Name: not nullable String read;

 

String! Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

Open (FileOpenMode): not nullable FileHandle Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Open a file with the given file mode.

 

method Open(Mode: FileOpenMode): not nullable FileHandle

 

FileHandle! Open(FileOpenMode Mode)

 

func Open(_ Mode: FileOpenMode) -> FileHandle

 

FileHandle Open(FileOpenMode Mode)

 

Function Open(Mode As FileOpenMode) As FileHandle

Parameters:

  • Mode:

Open (FileOpenMode): not nullable FileHandle .NET, .NET Core 6.0, .NET Standard 2.0

 

method Open(Mode: FileOpenMode): not nullable FileHandle

 

FileHandle! Open(FileOpenMode Mode)

 

func Open(_ Mode: FileOpenMode) -> FileHandle

 

Function Open(Mode As FileOpenMode) As FileHandle

Parameters:

  • Mode:

ReadBinary Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file.

 

method ReadBinary: ImmutableBinary

 

ImmutableBinary ReadBinary()

 

func ReadBinary() -> ImmutableBinary

 

ImmutableBinary ReadBinary()

 

Function ReadBinary() As ImmutableBinary

ReadBinary (String): ImmutableBinary .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file.

 

class method ReadBinary(aFileName: String): ImmutableBinary

 

static ImmutableBinary ReadBinary(String aFileName)

 

static func ReadBinary(_ aFileName: String) -> ImmutableBinary

 

static ImmutableBinary ReadBinary(String aFileName)

 

Shared Function ReadBinary(aFileName As String) As ImmutableBinary

Parameters:

  • aFileName:

ReadBytes Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file.

 

method ReadBytes: array of Byte

 

Byte[] ReadBytes()

 

func ReadBytes() -> Byte...

 

Byte[] ReadBytes()

 

Function ReadBytes() As Byte()

ReadBytes (String): array of Byte .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file.

 

class method ReadBytes(aFileName: String): array of Byte

 

static Byte[] ReadBytes(String aFileName)

 

static func ReadBytes(_ aFileName: String) -> Byte...

 

static Byte[] ReadBytes(String aFileName)

 

Shared Function ReadBytes(aFileName As String) As Byte()

Parameters:

  • aFileName:

ReadLines .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file, decode it from the given encoding.

 

class method ReadLines(aFileName: String; aEncoding: Encoding): ImmutableList<String>

 

static ImmutableList<String> ReadLines(String aFileName, Encoding aEncoding)

 

static func ReadLines(_ aFileName: String, _ aEncoding: Encoding) -> ImmutableList<String>

 

static ImmutableList<String> ReadLines(String aFileName, Encoding aEncoding)

 

Shared Function ReadLines(aFileName As String, aEncoding As Encoding) As ImmutableList<String>

Parameters:

  • aFileName:
  • aEncoding:

ReadText (Encoding): String Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file, decode it from the given encoding.

 

method ReadText(Encoding: Encoding): String

 

String ReadText(Encoding Encoding)

 

func ReadText(_ Encoding: Encoding) -> String

 

String ReadText(Encoding Encoding)

 

Function ReadText(Encoding As Encoding) As String

Parameters:

  • Encoding:

ReadText (Encoding): String .NET, .NET Core 6.0, .NET Standard 2.0

 

method ReadText(Encoding: Encoding): String

 

String ReadText(Encoding Encoding)

 

func ReadText(_ Encoding: Encoding) -> String

 

Function ReadText(Encoding As Encoding) As String

Parameters:

  • Encoding:

ReadText (String, Encoding): String .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file, decode it from the given encoding.

 

class method ReadText(aFileName: String; aEncoding: Encoding): String

 

static String ReadText(String aFileName, Encoding aEncoding)

 

static func ReadText(_ aFileName: String, _ aEncoding: Encoding) -> String

 

static String ReadText(String aFileName, Encoding aEncoding)

 

Shared Function ReadText(aFileName As String, aEncoding As Encoding) As String

Parameters:

  • aFileName:
  • aEncoding:

Rename (not nullable String): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

method Rename(NewName: not nullable String): not nullable File

 

File! Rename(String! NewName)

 

func Rename(_ NewName: String) -> File

 

File Rename(String NewName)

 

Function Rename(NewName As String) As File

Parameters:

  • NewName:

Rename (not nullable String): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0

 

method Rename(NewName: not nullable String): not nullable File

 

File! Rename(String! NewName)

 

func Rename(_ NewName: String) -> File

 

Function Rename(NewName As String) As File

Parameters:

  • NewName:

Rename (not nullable File, not nullable String): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

class method Rename(aFileName: not nullable File; NewName: not nullable String): not nullable File

 

static File! Rename(File! aFileName, String! NewName)

 

static func Rename(_ aFileName: File, _ NewName: String) -> File

 

static File Rename(File aFileName, String NewName)

 

Shared Function Rename(aFileName As File, NewName As String) As File

Parameters:

  • aFileName:
  • NewName:

Size (nullable File): Int64 .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method Size(aFileName: nullable File): Int64

 

static Int64 Size(File? aFileName)

 

// Toffee
static func Size(_ aFileName: File) -> Int64
// ToffeeV2
static func Size(_ aFileName: File?) -> Int64

 

Shared Function Size(aFileName As File?) As Int64

Parameters:

  • aFileName:

Size .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Returns the size of this file.

 

property Size: Int64 read;

 

Int64 Size { get; }

 

var Size: Int64 { get{} }

 

Int64 Size { __get; }

 

ReadOnly Property Size() As Int64

WriteBinary .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Write a binary to a file, overwriting it if it already exists.

 

class method WriteBinary(aFileName: String; Content: ImmutableBinary)

 

static void WriteBinary(String aFileName, ImmutableBinary Content)

 

static func WriteBinary(_ aFileName: String, _ Content: ImmutableBinary)

 

static void WriteBinary(String aFileName, ImmutableBinary Content)

 

Shared Sub WriteBinary(aFileName As String, Content As ImmutableBinary)

Parameters:

  • aFileName:
  • Content:

WriteBytes .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Write a binary to a file, overwriting it if it already exists.

 

class method WriteBytes(aFileName: String; Content: array of Byte)

 

static void WriteBytes(String aFileName, Byte[] Content)

 

static func WriteBytes(_ aFileName: String, _ Content: Byte...)

 

static void WriteBytes(String aFileName, Byte[] Content)

 

Shared Sub WriteBytes(aFileName As String, Content As Byte())

Parameters:

  • aFileName:
  • Content:

WriteLines (String, Iterable<String>, Encoding) Cooper

 

class method WriteLines(aFileName: String; Content: Iterable<String>; aEncoding: Encoding)

 

static void WriteLines(String aFileName, Iterable<String> Content, Encoding aEncoding)

 

static func WriteLines(_ aFileName: String, _ Content: Iterable<String>, _ aEncoding: Encoding)

 

static void WriteLines(String aFileName, Iterable<String> Content, Encoding aEncoding)

 

Shared Sub WriteLines(aFileName As String, Content As Iterable<String>, aEncoding As Encoding)

Parameters:

  • aFileName:
  • Content:
  • aEncoding:

WriteLines (String, IEnumerable<String>, Encoding, Boolean) .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method WriteLines(aFileName: String; Content: IEnumerable<String>; aEncoding: Encoding; aIncludeBOM: Boolean)

 

static void WriteLines(String aFileName, IEnumerable<String> Content, Encoding aEncoding, Boolean aIncludeBOM)

 

// Toffee
static func WriteLines(_ aFileName: String, _ Content: INSFastEnumeration<String>, _ aEncoding: Encoding, _ aIncludeBOM: Boolean)
// ToffeeV2
static func WriteLines(_ aFileName: String, _ Content: IEnumerable<String>, _ aEncoding: Encoding, _ aIncludeBOM: Boolean)

 

Shared Sub WriteLines(aFileName As String, Content As IEnumerable<String>, aEncoding As Encoding, aIncludeBOM As Boolean)

Parameters:

  • aFileName:
  • Content:
  • aEncoding:
  • aIncludeBOM:

WriteText (String, String, Encoding) Cooper

Writes text to a file, overwriting it if it already exists.

 

class method WriteText(aFileName: String; Content: String; aEncoding: Encoding)

 

static void WriteText(String aFileName, String Content, Encoding aEncoding)

 

static func WriteText(_ aFileName: String, _ Content: String, _ aEncoding: Encoding)

 

static void WriteText(String aFileName, String Content, Encoding aEncoding)

 

Shared Sub WriteText(aFileName As String, Content As String, aEncoding As Encoding)

Parameters:

  • aFileName:
  • Content:
  • aEncoding:

WriteText (String, String, Encoding, Boolean) .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method WriteText(aFileName: String; Content: String; aEncoding: Encoding; aIncludeBOM: Boolean)

 

static void WriteText(String aFileName, String Content, Encoding aEncoding, Boolean aIncludeBOM)

 

static func WriteText(_ aFileName: String, _ Content: String, _ aEncoding: Encoding, _ aIncludeBOM: Boolean)

 

Shared Sub WriteText(aFileName As String, Content As String, aEncoding As Encoding, aIncludeBOM As Boolean)

Parameters:

  • aFileName:
  • Content:
  • aEncoding:
  • aIncludeBOM:

 

DateCreated Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Date this file was created.

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

DateTime DateCreated { __get; }

 

ReadOnly Property DateCreated() As DateTime

DateModified Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Date this file was modified.

 

property DateModified: DateTime read write;

 

DateTime DateModified { get; set; }

 

var DateModified: DateTime { get{} set{} }

 

DateTime DateModified { __get; __set; }

 

Property DateModified() As DateTime

Extension

Returns the extension including .

 

property Extension: not nullable String read;

 

String! Extension { get; }

 

var Extension: String { get{} }

 

String Extension { __get; }

 

ReadOnly Property Extension() As String

FullPath

Returns the full path to this file.

 

property FullPath: not nullable String read;

 

String! FullPath { get; }

 

var FullPath: String { get{} }

 

String FullPath { __get; }

 

ReadOnly Property FullPath() As String

Name

Returns the name of this file, without path.

 

property Name: not nullable String read;

 

String! Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

Size .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Returns the size of this file.

 

property Size: Int64 read;

 

Int64 Size { get; }

 

var Size: Int64 { get{} }

 

Int64 Size { __get; }

 

ReadOnly Property Size() As Int64

DateCreated .NET, .NET Core 6.0, .NET Standard 2.0

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

ReadOnly Property DateCreated() As DateTime

DateModified .NET, .NET Core 6.0, .NET Standard 2.0

 

property DateModified: DateTime read write;

 

DateTime DateModified { get; set; }

 

var DateModified: DateTime { get{} set{} }

 

Property DateModified() As DateTime

 

AppendBinary .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Append binary data to the file aFilename.

 

class method AppendBinary(aFileName: String; Content: ImmutableBinary)

 

static void AppendBinary(String aFileName, ImmutableBinary Content)

 

static func AppendBinary(_ aFileName: String, _ Content: ImmutableBinary)

 

static void AppendBinary(String aFileName, ImmutableBinary Content)

 

Shared Sub AppendBinary(aFileName As String, Content As ImmutableBinary)

Parameters:

  • aFileName:
  • Content:

AppendBytes .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Append binary data to the file aFilename.

 

class method AppendBytes(aFileName: String; Content: array of Byte)

 

static void AppendBytes(String aFileName, Byte[] Content)

 

static func AppendBytes(_ aFileName: String, _ Content: Byte...)

 

static void AppendBytes(String aFileName, Byte[] Content)

 

Shared Sub AppendBytes(aFileName As String, Content As Byte())

Parameters:

  • aFileName:
  • Content:

AppendText .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Append text to end of the the file aFilename.

 

class method AppendText(aFileName: String; Content: String)

 

static void AppendText(String aFileName, String Content)

 

static func AppendText(_ aFileName: String, _ Content: String)

 

static void AppendText(String aFileName, String Content)

 

Shared Sub AppendText(aFileName As String, Content As String)

Parameters:

  • aFileName:
  • Content:

CopyTo (not nullable File, not nullable File, Boolean): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Copy a file to another file.

 

class method CopyTo(aFileName: not nullable File; NewPathAndName: not nullable File; aCloneIfPossible: Boolean): not nullable File

 

static File! CopyTo(File! aFileName, File! NewPathAndName, Boolean aCloneIfPossible)

 

static func CopyTo(_ aFileName: File, _ NewPathAndName: File, _ aCloneIfPossible: Boolean) -> File

 

static File CopyTo(File aFileName, File NewPathAndName, Boolean aCloneIfPossible)

 

Shared Function CopyTo(aFileName As File, NewPathAndName As File, aCloneIfPossible As Boolean) As File

Parameters:

  • aFileName:
  • NewPathAndName:
  • aCloneIfPossible:

DateCreated (nullable File): DateTime .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method DateCreated(aFileName: nullable File): DateTime

 

static DateTime DateCreated(File? aFileName)

 

// Toffee
static func DateCreated(_ aFileName: File) -> DateTime
// ToffeeV2
static func DateCreated(_ aFileName: File?) -> DateTime

 

Shared Function DateCreated(aFileName As File?) As DateTime

Parameters:

  • aFileName:

DateModified (nullable File): DateTime .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method DateModified(aFileName: nullable File): DateTime

 

static DateTime DateModified(File? aFileName)

 

// Toffee
static func DateModified(_ aFileName: File) -> DateTime
// ToffeeV2
static func DateModified(_ aFileName: File?) -> DateTime

 

Shared Function DateModified(aFileName As File?) As DateTime

Parameters:

  • aFileName:

Delete (not nullable File) .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Delete this file.

 

class method Delete(aFileName: not nullable File)

 

static void Delete(File! aFileName)

 

static func Delete(_ aFileName: File)

 

static void Delete(File aFileName)

 

Shared Sub Delete(aFileName As File)

Parameters:

  • aFileName:

Exists (nullable File): Boolean .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Check if a file exists.

 

class method Exists(aFileName: nullable File): Boolean

 

static Boolean Exists(File? aFileName)

 

// Toffee
static func Exists(_ aFileName: File) -> Boolean
// ToffeeV2
static func Exists(_ aFileName: File?) -> Boolean

 

static Boolean Exists(File aFileName)

 

Shared Function Exists(aFileName As File?) As Boolean

Parameters:

  • aFileName:

IsReadOnly (nullable File): Boolean .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method IsReadOnly(aFileName: nullable File): Boolean

 

static Boolean IsReadOnly(File? aFileName)

 

// Toffee
static func IsReadOnly(_ aFileName: File) -> Boolean
// ToffeeV2
static func IsReadOnly(_ aFileName: File?) -> Boolean

 

static Boolean IsReadOnly(File aFileName)

 

Shared Function IsReadOnly(aFileName As File?) As Boolean

Parameters:

  • aFileName:

Move (not nullable File, not nullable File): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

class method Move(aFileName: not nullable File; NewPathAndName: not nullable File): not nullable File

 

static File! Move(File! aFileName, File! NewPathAndName)

 

static func Move(_ aFileName: File, _ NewPathAndName: File) -> File

 

static File Move(File aFileName, File NewPathAndName)

 

Shared Function Move(aFileName As File, NewPathAndName As File) As File

Parameters:

  • aFileName:
  • NewPathAndName:

ReadBinary (String): ImmutableBinary .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file.

 

class method ReadBinary(aFileName: String): ImmutableBinary

 

static ImmutableBinary ReadBinary(String aFileName)

 

static func ReadBinary(_ aFileName: String) -> ImmutableBinary

 

static ImmutableBinary ReadBinary(String aFileName)

 

Shared Function ReadBinary(aFileName As String) As ImmutableBinary

Parameters:

  • aFileName:

ReadBytes (String): array of Byte .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file.

 

class method ReadBytes(aFileName: String): array of Byte

 

static Byte[] ReadBytes(String aFileName)

 

static func ReadBytes(_ aFileName: String) -> Byte...

 

static Byte[] ReadBytes(String aFileName)

 

Shared Function ReadBytes(aFileName As String) As Byte()

Parameters:

  • aFileName:

ReadLines .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file, decode it from the given encoding.

 

class method ReadLines(aFileName: String; aEncoding: Encoding): ImmutableList<String>

 

static ImmutableList<String> ReadLines(String aFileName, Encoding aEncoding)

 

static func ReadLines(_ aFileName: String, _ aEncoding: Encoding) -> ImmutableList<String>

 

static ImmutableList<String> ReadLines(String aFileName, Encoding aEncoding)

 

Shared Function ReadLines(aFileName As String, aEncoding As Encoding) As ImmutableList<String>

Parameters:

  • aFileName:
  • aEncoding:

ReadText (String, Encoding): String .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file, decode it from the given encoding.

 

class method ReadText(aFileName: String; aEncoding: Encoding): String

 

static String ReadText(String aFileName, Encoding aEncoding)

 

static func ReadText(_ aFileName: String, _ aEncoding: Encoding) -> String

 

static String ReadText(String aFileName, Encoding aEncoding)

 

Shared Function ReadText(aFileName As String, aEncoding As Encoding) As String

Parameters:

  • aFileName:
  • aEncoding:

Rename (not nullable File, not nullable String): not nullable File .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

class method Rename(aFileName: not nullable File; NewName: not nullable String): not nullable File

 

static File! Rename(File! aFileName, String! NewName)

 

static func Rename(_ aFileName: File, _ NewName: String) -> File

 

static File Rename(File aFileName, String NewName)

 

Shared Function Rename(aFileName As File, NewName As String) As File

Parameters:

  • aFileName:
  • NewName:

Size (nullable File): Int64 .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method Size(aFileName: nullable File): Int64

 

static Int64 Size(File? aFileName)

 

// Toffee
static func Size(_ aFileName: File) -> Int64
// ToffeeV2
static func Size(_ aFileName: File?) -> Int64

 

Shared Function Size(aFileName As File?) As Int64

Parameters:

  • aFileName:

WriteBinary .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Write a binary to a file, overwriting it if it already exists.

 

class method WriteBinary(aFileName: String; Content: ImmutableBinary)

 

static void WriteBinary(String aFileName, ImmutableBinary Content)

 

static func WriteBinary(_ aFileName: String, _ Content: ImmutableBinary)

 

static void WriteBinary(String aFileName, ImmutableBinary Content)

 

Shared Sub WriteBinary(aFileName As String, Content As ImmutableBinary)

Parameters:

  • aFileName:
  • Content:

WriteBytes .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Write a binary to a file, overwriting it if it already exists.

 

class method WriteBytes(aFileName: String; Content: array of Byte)

 

static void WriteBytes(String aFileName, Byte[] Content)

 

static func WriteBytes(_ aFileName: String, _ Content: Byte...)

 

static void WriteBytes(String aFileName, Byte[] Content)

 

Shared Sub WriteBytes(aFileName As String, Content As Byte())

Parameters:

  • aFileName:
  • Content:

WriteLines (String, Iterable<String>, Encoding) Cooper

 

class method WriteLines(aFileName: String; Content: Iterable<String>; aEncoding: Encoding)

 

static void WriteLines(String aFileName, Iterable<String> Content, Encoding aEncoding)

 

static func WriteLines(_ aFileName: String, _ Content: Iterable<String>, _ aEncoding: Encoding)

 

static void WriteLines(String aFileName, Iterable<String> Content, Encoding aEncoding)

 

Shared Sub WriteLines(aFileName As String, Content As Iterable<String>, aEncoding As Encoding)

Parameters:

  • aFileName:
  • Content:
  • aEncoding:

WriteLines (String, IEnumerable<String>, Encoding, Boolean) .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method WriteLines(aFileName: String; Content: IEnumerable<String>; aEncoding: Encoding; aIncludeBOM: Boolean)

 

static void WriteLines(String aFileName, IEnumerable<String> Content, Encoding aEncoding, Boolean aIncludeBOM)

 

// Toffee
static func WriteLines(_ aFileName: String, _ Content: INSFastEnumeration<String>, _ aEncoding: Encoding, _ aIncludeBOM: Boolean)
// ToffeeV2
static func WriteLines(_ aFileName: String, _ Content: IEnumerable<String>, _ aEncoding: Encoding, _ aIncludeBOM: Boolean)

 

Shared Sub WriteLines(aFileName As String, Content As IEnumerable<String>, aEncoding As Encoding, aIncludeBOM As Boolean)

Parameters:

  • aFileName:
  • Content:
  • aEncoding:
  • aIncludeBOM:

WriteText (String, String, Encoding) Cooper

Writes text to a file, overwriting it if it already exists.

 

class method WriteText(aFileName: String; Content: String; aEncoding: Encoding)

 

static void WriteText(String aFileName, String Content, Encoding aEncoding)

 

static func WriteText(_ aFileName: String, _ Content: String, _ aEncoding: Encoding)

 

static void WriteText(String aFileName, String Content, Encoding aEncoding)

 

Shared Sub WriteText(aFileName As String, Content As String, aEncoding As Encoding)

Parameters:

  • aFileName:
  • Content:
  • aEncoding:

WriteText (String, String, Encoding, Boolean) .NET, .NET Core 6.0, .NET Standard 2.0, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method WriteText(aFileName: String; Content: String; aEncoding: Encoding; aIncludeBOM: Boolean)

 

static void WriteText(String aFileName, String Content, Encoding aEncoding, Boolean aIncludeBOM)

 

static func WriteText(_ aFileName: String, _ Content: String, _ aEncoding: Encoding, _ aIncludeBOM: Boolean)

 

Shared Sub WriteText(aFileName As String, Content As String, aEncoding As Encoding, aIncludeBOM As Boolean)

Parameters:

  • aFileName:
  • Content:
  • aEncoding:
  • aIncludeBOM:

 

CopyTo (not nullable Folder, not nullable String, Boolean): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Copy a file to another file.

 

method CopyTo(Destination: not nullable Folder; NewName: not nullable String; aCloneIfPossible: Boolean): not nullable File

 

File! CopyTo(Folder! Destination, String! NewName, Boolean aCloneIfPossible)

 

func CopyTo(_ Destination: Folder, _ NewName: String, _ aCloneIfPossible: Boolean) -> File

 

File CopyTo(Folder Destination, String NewName, Boolean aCloneIfPossible)

 

Function CopyTo(Destination As Folder, NewName As String, aCloneIfPossible As Boolean) As File

Parameters:

  • Destination:
  • NewName:
  • aCloneIfPossible:

CopyTo (not nullable File, Boolean): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Copy a file to another file.

 

method CopyTo(NewPathAndName: not nullable File; aCloneIfPossible: Boolean): not nullable File

 

File! CopyTo(File! NewPathAndName, Boolean aCloneIfPossible)

 

func CopyTo(_ NewPathAndName: File, _ aCloneIfPossible: Boolean) -> File

 

File CopyTo(File NewPathAndName, Boolean aCloneIfPossible)

 

Function CopyTo(NewPathAndName As File, aCloneIfPossible As Boolean) As File

Parameters:

  • NewPathAndName:
  • aCloneIfPossible:

Delete Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Delete this file.

 

method Delete

 

void Delete()

 

func Delete()

 

void Delete()

 

Sub Delete()

Exists .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, ToffeeV2

Check if a file exists.

 

method Exists: Boolean

 

Boolean Exists()

 

func Exists() -> Boolean

 

Boolean Exists()

 

Function Exists() As Boolean

Exists Exists(): Boolean  virtual Toffee

 

func Exists(Exists ) -> Boolean

Parameters:

  • :

IsReadOnly .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, ToffeeV2

 

method IsReadOnly: Boolean

 

Boolean IsReadOnly()

 

func IsReadOnly() -> Boolean

 

Boolean IsReadOnly()

 

Function IsReadOnly() As Boolean

IsReadOnly IsReadOnly(): Boolean  virtual Toffee

 

func IsReadOnly(IsReadOnly ) -> Boolean

Parameters:

  • :

Move (not nullable Folder, not nullable String): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

method Move(DestinationFolder: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Move(Folder! DestinationFolder, String! NewName)

 

func Move(_ DestinationFolder: Folder, _ NewName: String) -> File

 

File Move(Folder DestinationFolder, String NewName)

 

Function Move(DestinationFolder As Folder, NewName As String) As File

Parameters:

  • DestinationFolder:
  • NewName:

Move (not nullable File): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

method Move(NewPathAndName: not nullable File): not nullable File

 

File! Move(File! NewPathAndName)

 

func Move(_ NewPathAndName: File) -> File

 

File Move(File NewPathAndName)

 

Function Move(NewPathAndName As File) As File

Parameters:

  • NewPathAndName:

Open (FileOpenMode): not nullable FileHandle Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Open a file with the given file mode.

 

method Open(Mode: FileOpenMode): not nullable FileHandle

 

FileHandle! Open(FileOpenMode Mode)

 

func Open(_ Mode: FileOpenMode) -> FileHandle

 

FileHandle Open(FileOpenMode Mode)

 

Function Open(Mode As FileOpenMode) As FileHandle

Parameters:

  • Mode:

ReadBinary Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file.

 

method ReadBinary: ImmutableBinary

 

ImmutableBinary ReadBinary()

 

func ReadBinary() -> ImmutableBinary

 

ImmutableBinary ReadBinary()

 

Function ReadBinary() As ImmutableBinary

ReadBytes Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file.

 

method ReadBytes: array of Byte

 

Byte[] ReadBytes()

 

func ReadBytes() -> Byte...

 

Byte[] ReadBytes()

 

Function ReadBytes() As Byte()

ReadText (Encoding): String Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Read the content of this file, decode it from the given encoding.

 

method ReadText(Encoding: Encoding): String

 

String ReadText(Encoding Encoding)

 

func ReadText(_ Encoding: Encoding) -> String

 

String ReadText(Encoding Encoding)

 

Function ReadText(Encoding As Encoding) As String

Parameters:

  • Encoding:

Rename (not nullable String): not nullable File Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-visionOS, Island-visionOS Simulator, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Move a file to another location.

 

method Rename(NewName: not nullable String): not nullable File

 

File! Rename(String! NewName)

 

func Rename(_ NewName: String) -> File

 

File Rename(String NewName)

 

Function Rename(NewName As String) As File

Parameters:

  • NewName: