File

Overview

File information class.

Location

  • Reference: Island.fx
  • Namespace: RemObjects.Elements.System
  • Platforms: Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows
  • Ancestry: BaseFile | File

 

constructor    (declared in Object)

 

constructor

 

File()

 

init()

 

File()

 

Sub New()

constructor (not nullable String)

Constructor for this class.

 

constructor(aFullName: not nullable String)

 

File(String! aFullName)

 

init(_ aFullName: String)

 

File(String aFullName)

 

Sub New(aFullName As String)

Parameters:

  • aFullName: the full name of this file.

Copy (not nullable Folder, not nullable String): not nullable File

Copies a file to a new location

 

method Copy(Destination: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Copy(Folder! Destination, String! NewName)

 

func Copy(_ Destination: Folder, _ NewName: String) -> File

 

File Copy(Folder Destination, String NewName)

 

Function Copy(Destination As Folder, NewName As String) As File

Parameters:

  • Destination: Target directory
  • NewName: Target filename

Copy (not nullable String): not nullable File

Copies a file to a new location

 

method Copy(FullPathName: not nullable String): not nullable File

 

File! Copy(String! FullPathName)

 

func Copy(_ FullPathName: String) -> File

 

File Copy(String FullPathName)

 

Function Copy(FullPathName As String) As File

Parameters:

  • FullPathName: Target filename

Copy (not nullable File)

Copies a file to a new location

 

method Copy(NewFile: not nullable File)

 

void Copy(File! NewFile)

 

func Copy(_ NewFile: File)

 

void Copy(File NewFile)

 

Sub Copy(NewFile As File)

Parameters:

  • NewFile: Target filename

Copy (String, String)

 

class method Copy(aSource: String; aDest: String)

 

static void Copy(String aSource, String aDest)

 

static func Copy(_ aSource: String, _ aDest: String)

 

static void Copy(String aSource, String aDest)

 

Shared Sub Copy(aSource As String, aDest As String)

Parameters:

  • aSource:
  • aDest:

DateAccessed    (declared in BaseFile)

Date this file system item was last accessed.

 

property DateAccessed: DateTime read;

 

DateTime DateAccessed { get; }

 

var DateAccessed: DateTime { get{} }

 

DateTime DateAccessed { __get; }

 

ReadOnly Property DateAccessed() As DateTime

DateCreated    (declared in BaseFile)

Date this filesystem element was created.

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

DateTime DateCreated { __get; }

 

ReadOnly Property DateCreated() As DateTime

DateModified    (declared in BaseFile)

Date this filesystem element was last modif

 

property DateModified: DateTime read;

 

DateTime DateModified { get; }

 

var DateModified: DateTime { get{} }

 

DateTime DateModified { __get; }

 

ReadOnly Property DateModified() As DateTime

Delete  override virtual

 

method Delete

 

void Delete()

 

func Delete()

 

void Delete()

 

Sub Delete()

Delete (String)

 

class method Delete(aFile: String)

 

static void Delete(String aFile)

 

static func Delete(_ aFile: String)

 

static void Delete(String aFile)

 

Shared Sub Delete(aFile As String)

Parameters:

  • aFile:

Equals  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Exists  override virtual

Check if this element exists.

 

method Exists: Boolean

 

Boolean Exists()

 

func Exists() -> Boolean

 

Boolean Exists()

 

Function Exists() As Boolean

Exists (String): Boolean

 

class method Exists(aFile: String): Boolean

 

static Boolean Exists(String aFile)

 

static func Exists(_ aFile: String) -> Boolean

 

static Boolean Exists(String aFile)

 

Shared Function Exists(aFile As String) As Boolean

Parameters:

  • aFile:

Extension    (declared in BaseFile)

Returns the extension of this file/folder preceded with a .

 

property Extension: not nullable String read;

 

String! Extension { get; }

 

var Extension: String { get{} }

 

String Extension { __get; }

 

ReadOnly Property Extension() As String

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

FullName    (declared in BaseFile)

Returns the full name including path.

 

property FullName: not nullable String read;

 

String! FullName { get; }

 

var FullName: String { get{} }

 

String FullName { __get; }

 

ReadOnly Property FullName() As String

GetHandle  protected    (declared in BaseFile) Windows

Returns a handle to this file.

 

method GetHandle: HANDLE

 

HANDLE GetHandle()

 

func GetHandle() -> HANDLE

 

HANDLE GetHandle()

 

Function GetHandle() As HANDLE

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

IsReadOnly

 

method IsReadOnly: Boolean

 

Boolean IsReadOnly()

 

func IsReadOnly() -> Boolean

 

Boolean IsReadOnly()

 

Function IsReadOnly() As Boolean

IsReadOnly (String): Boolean

 

class method IsReadOnly(aFile: String): Boolean

 

static Boolean IsReadOnly(String aFile)

 

static func IsReadOnly(_ aFile: String) -> Boolean

 

static Boolean IsReadOnly(String aFile)

 

Shared Function IsReadOnly(aFile As String) As Boolean

Parameters:

  • aFile:

Length

Contains the size of this file.

 

property Length: Int64 read;

 

Int64 Length { get; }

 

var Length: Int64 { get{} }

 

Int64 Length { __get; }

 

ReadOnly Property Length() As Int64

Move (String, String)

 

method Move(aSource: String; aDest: String)

 

void Move(String aSource, String aDest)

 

func Move(_ aSource: String, _ aDest: String)

 

void Move(String aSource, String aDest)

 

Sub Move(aSource As String, aDest As String)

Parameters:

  • aSource:
  • aDest:

Move (not nullable Folder, not nullable String): not nullable File

Moves a file to a new 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: Target directory
  • NewName: Target filename

Move (not nullable String): not nullable File

Moves a file to a new location

 

method Move(FullPathName: not nullable String): not nullable File

 

File! Move(String! FullPathName)

 

func Move(_ FullPathName: String) -> File

 

File Move(String FullPathName)

 

Function Move(FullPathName As String) As File

Parameters:

  • FullPathName: Target filename

Move (not nullable File)

Moves a file to a new location

 

method Move(NewFile: not nullable File)

 

void Move(File! NewFile)

 

func Move(_ NewFile: File)

 

void Move(File NewFile)

 

Sub Move(NewFile As File)

Parameters:

  • NewFile: Target filename

Name    (declared in BaseFile)

Returns the name without path.

 

property Name: not nullable String read;

 

String! Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

ReadBytes

Reads the content of this file.

 

method ReadBytes: array of Byte

 

Byte[] ReadBytes()

 

func ReadBytes() -> Byte...

 

Byte[] ReadBytes()

 

Function ReadBytes() As Byte()

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

Rename (String, String)

 

method Rename(aSource: String; aDest: String)

 

void Rename(String aSource, String aDest)

 

func Rename(_ aSource: String, _ aDest: String)

 

void Rename(String aSource, String aDest)

 

Sub Rename(aSource As String, aDest As String)

Parameters:

  • aSource:
  • aDest:

Rename (not nullable String): not nullable File

Renames a file.

 

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: Target filename

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

Validate  protected override virtual

 

method Validate

 

void Validate()

 

func Validate()

 

void Validate()

 

Sub Validate()

 

DateAccessed    (declared in BaseFile)

Date this file system item was last accessed.

 

property DateAccessed: DateTime read;

 

DateTime DateAccessed { get; }

 

var DateAccessed: DateTime { get{} }

 

DateTime DateAccessed { __get; }

 

ReadOnly Property DateAccessed() As DateTime

DateCreated    (declared in BaseFile)

Date this filesystem element was created.

 

property DateCreated: DateTime read;

 

DateTime DateCreated { get; }

 

var DateCreated: DateTime { get{} }

 

DateTime DateCreated { __get; }

 

ReadOnly Property DateCreated() As DateTime

DateModified    (declared in BaseFile)

Date this filesystem element was last modif

 

property DateModified: DateTime read;

 

DateTime DateModified { get; }

 

var DateModified: DateTime { get{} }

 

DateTime DateModified { __get; }

 

ReadOnly Property DateModified() As DateTime

Extension    (declared in BaseFile)

Returns the extension of this file/folder preceded with a .

 

property Extension: not nullable String read;

 

String! Extension { get; }

 

var Extension: String { get{} }

 

String Extension { __get; }

 

ReadOnly Property Extension() As String

FullName    (declared in BaseFile)

Returns the full name including path.

 

property FullName: not nullable String read;

 

String! FullName { get; }

 

var FullName: String { get{} }

 

String FullName { __get; }

 

ReadOnly Property FullName() As String

Length

Contains the size of this file.

 

property Length: Int64 read;

 

Int64 Length { get; }

 

var Length: Int64 { get{} }

 

Int64 Length { __get; }

 

ReadOnly Property Length() As Int64

Name    (declared in BaseFile)

Returns the name without path.

 

property Name: not nullable String read;

 

String! Name { get; }

 

var Name: String { get{} }

 

String Name { __get; }

 

ReadOnly Property Name() As String

 

Copy (String, String)

 

class method Copy(aSource: String; aDest: String)

 

static void Copy(String aSource, String aDest)

 

static func Copy(_ aSource: String, _ aDest: String)

 

static void Copy(String aSource, String aDest)

 

Shared Sub Copy(aSource As String, aDest As String)

Parameters:

  • aSource:
  • aDest:

Delete (String)

 

class method Delete(aFile: String)

 

static void Delete(String aFile)

 

static func Delete(_ aFile: String)

 

static void Delete(String aFile)

 

Shared Sub Delete(aFile As String)

Parameters:

  • aFile:

Exists (String): Boolean

 

class method Exists(aFile: String): Boolean

 

static Boolean Exists(String aFile)

 

static func Exists(_ aFile: String) -> Boolean

 

static Boolean Exists(String aFile)

 

Shared Function Exists(aFile As String) As Boolean

Parameters:

  • aFile:

IsReadOnly (String): Boolean

 

class method IsReadOnly(aFile: String): Boolean

 

static Boolean IsReadOnly(String aFile)

 

static func IsReadOnly(_ aFile: String) -> Boolean

 

static Boolean IsReadOnly(String aFile)

 

Shared Function IsReadOnly(aFile As String) As Boolean

Parameters:

  • aFile:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

 

constructor

 

File()

 

init()

 

File()

 

Sub New()

constructor (not nullable String)

Constructor for this class.

 

constructor(aFullName: not nullable String)

 

File(String! aFullName)

 

init(_ aFullName: String)

 

File(String aFullName)

 

Sub New(aFullName As String)

Parameters:

  • aFullName: the full name of this file.

Copy (not nullable Folder, not nullable String): not nullable File

Copies a file to a new location

 

method Copy(Destination: not nullable Folder; NewName: not nullable String): not nullable File

 

File! Copy(Folder! Destination, String! NewName)

 

func Copy(_ Destination: Folder, _ NewName: String) -> File

 

File Copy(Folder Destination, String NewName)

 

Function Copy(Destination As Folder, NewName As String) As File

Parameters:

  • Destination: Target directory
  • NewName: Target filename

Copy (not nullable String): not nullable File

Copies a file to a new location

 

method Copy(FullPathName: not nullable String): not nullable File

 

File! Copy(String! FullPathName)

 

func Copy(_ FullPathName: String) -> File

 

File Copy(String FullPathName)

 

Function Copy(FullPathName As String) As File

Parameters:

  • FullPathName: Target filename

Copy (not nullable File)

Copies a file to a new location

 

method Copy(NewFile: not nullable File)

 

void Copy(File! NewFile)

 

func Copy(_ NewFile: File)

 

void Copy(File NewFile)

 

Sub Copy(NewFile As File)

Parameters:

  • NewFile: Target filename

Delete  override virtual

 

method Delete

 

void Delete()

 

func Delete()

 

void Delete()

 

Sub Delete()

Equals  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Exists  override virtual

Check if this element exists.

 

method Exists: Boolean

 

Boolean Exists()

 

func Exists() -> Boolean

 

Boolean Exists()

 

Function Exists() As Boolean

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHandle  protected    (declared in BaseFile) Windows

Returns a handle to this file.

 

method GetHandle: HANDLE

 

HANDLE GetHandle()

 

func GetHandle() -> HANDLE

 

HANDLE GetHandle()

 

Function GetHandle() As HANDLE

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

IsReadOnly

 

method IsReadOnly: Boolean

 

Boolean IsReadOnly()

 

func IsReadOnly() -> Boolean

 

Boolean IsReadOnly()

 

Function IsReadOnly() As Boolean

Move (String, String)

 

method Move(aSource: String; aDest: String)

 

void Move(String aSource, String aDest)

 

func Move(_ aSource: String, _ aDest: String)

 

void Move(String aSource, String aDest)

 

Sub Move(aSource As String, aDest As String)

Parameters:

  • aSource:
  • aDest:

Move (not nullable Folder, not nullable String): not nullable File

Moves a file to a new 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: Target directory
  • NewName: Target filename

Move (not nullable String): not nullable File

Moves a file to a new location

 

method Move(FullPathName: not nullable String): not nullable File

 

File! Move(String! FullPathName)

 

func Move(_ FullPathName: String) -> File

 

File Move(String FullPathName)

 

Function Move(FullPathName As String) As File

Parameters:

  • FullPathName: Target filename

Move (not nullable File)

Moves a file to a new location

 

method Move(NewFile: not nullable File)

 

void Move(File! NewFile)

 

func Move(_ NewFile: File)

 

void Move(File NewFile)

 

Sub Move(NewFile As File)

Parameters:

  • NewFile: Target filename

ReadBytes

Reads the content of this file.

 

method ReadBytes: array of Byte

 

Byte[] ReadBytes()

 

func ReadBytes() -> Byte...

 

Byte[] ReadBytes()

 

Function ReadBytes() As Byte()

Rename (String, String)

 

method Rename(aSource: String; aDest: String)

 

void Rename(String aSource, String aDest)

 

func Rename(_ aSource: String, _ aDest: String)

 

void Rename(String aSource, String aDest)

 

Sub Rename(aSource As String, aDest As String)

Parameters:

  • aSource:
  • aDest:

Rename (not nullable String): not nullable File

Renames a file.

 

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: Target filename

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

Validate  protected override virtual

 

method Validate

 

void Validate()

 

func Validate()

 

void Validate()

 

Sub Validate()