Skip to content

File

graph BT
N1["File"] -->|inherits| N2["Input"];
N1["File"] -->|inherits| N3["Output"];
N3["Output"] -->|inherits| N4["IOBase"];
N4["IOBase"] -->|inherits| N5["Any"];
N2["Input"] -->|inherits| N4["IOBase"];
N2["Input"] -->|inherits| N6["IterableAT"];
N6["IterableAT"] -->|inherits| N5["Any"];
N4["IOBase"] -->|inherits| N5["Any"];

Characteristics

Quality Value
Inherits Input, Output
Extends N/A
Decorators N/A
Is enum false
Is sealed false
Is extern false
Is abstract false
Is generator false
Has value semantics false
Has stored properties true
Should register destructor false
Has atomic memory false
Is copy assignable false
Is zero initializable false

Functions

append_path

append_path (path1 String, path2 String) -> String

get_filename

get_filename (path String) -> String

get_stem

get_stem (path String) -> String

get_extension

get_extension (path String) -> String

get_parent

get_parent (path String) -> String

get_root

get_root (path String) -> String

get_root_name

get_root_name (path String) -> String

get_root_dir

get_root_dir (path String) -> String

is_absolute

is_absolute (path String) -> Bool

is_relative

is_relative (path String) -> Bool

has_stem

has_stem (path String) -> Bool

has_extension

has_extension (path String) -> Bool

has_filename

has_filename (path String) -> Bool

has_parent

has_parent (path String) -> Bool

has_root

has_root (path String) -> Bool

has_root_name

has_root_name (path String) -> Bool

has_root_dir

has_root_dir (path String) -> Bool

get_absolute

get_absolute (path String) -> String

get_canonical

get_canonical (path String) -> String

create_relative

create_relative (path String, base String) -> String

pwd

pwd () -> String

exists

exists (path String) -> Bool

is_equivalent

is_equivalent (path1 String, path2 String) -> Bool

len

len (path String) -> Len

hard_link_count (path String) -> Int64

resize

resize (path String, new_len Len) -> Bool

read_symlink (path String) -> String

get_permissions

get_permissions (path String, follow_symlinks Bool) -> UInt32

get_space

get_space (path String) -> Len, Len, Len

get_temp_directory

get_temp_directory () -> String

get_last_write_time

get_last_write_time (path String) -> Time

is_block_file

is_block_file (path String) -> Bool

is_character_file

is_character_file (path String) -> Bool

is_directory

is_directory (path String) -> Bool

is_empty

is_empty (path String) -> Bool

is_fifo

is_fifo (path String) -> Bool

is_other

is_other (path String) -> Bool

is_socket

is_socket (path String) -> Bool

is_symlink (path String) -> Bool

is_regular

is_regular (path String) -> Bool

is_unknown_type

is_unknown_type (path String) -> Bool

cp

cp (from String, to String, skip_existing: Bool = false, overwrite_existing: Bool = false, update_existing: Bool = false, recursive: Bool = false, copy_symlinks: Bool = false, skip_symlinks: Bool = false, directories_only: Bool = false, create_symlinks: Bool = false, create_hard_links: Bool = false) -> Bool

mkdir

mkdir (target String, attributes_from String = ``, parents: Bool = false) -> Bool

rm

rm (target String, recursive: Bool = false) -> Bool

mv

mv (old String, new String) -> Bool

ls

ls (target String, recursive: Bool = false, follow_directory_symlinks: Bool = false, skip_permission_denied: Bool = true) -> strictly List[String]

set_permissions

set_permissions (target String, perms UInt32, replace: Bool = true, add: Bool = false, remove: Bool = false, follow_symlinks: Bool = true) -> Bool

set_last_write_time

set_last_write_time (target String, time Time) -> Bool

Methods

construct

construct (s strictly @Self, path String = ``, mode String = `r`) -> Self

open

#strict
open (s nom @Self) -> Bool

reopen

#strict
reopen (s nom @Self) -> Bool

read

#strict
read (s nom @Self, count Len = -1) -> String

get_path

#strict
get_path (s nom @Self) -> String

get_mode

#strict
get_mode (s nom @Self) -> String

Properties

__path

__path String

__mode

__mode String

__handle

__handle Pointer

__is_open

__is_open Bool