FileNative.cpp File Reference
#include "oorexxapi.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#include "SysFileSystem.hpp"
Include dependency graph for FileNative.cpp:

Go to the source code of this file.

Functions

 RexxMethod0 (CSTRING, file_separator)
 
 RexxMethod0 (CSTRING, file_path_separator)
 
 RexxMethod0 (logical_t, file_case_sensitive)
 
 RexxMethod1 (logical_t, file_can_read, CSTRING, name)
 
 RexxMethod1 (logical_t, file_can_write, CSTRING, name)
 
 RexxMethod0 (RexxArrayObject, file_list_roots)
 
 RexxMethod1 (RexxStringObject, file_qualify, CSTRING, name)
 
 RexxMethod1 (logical_t, file_exists, CSTRING, name)
 
 RexxMethod1 (logical_t, file_delete_file, CSTRING, name)
 
 RexxMethod1 (logical_t, file_delete_directory, CSTRING, name)
 
 RexxMethod1 (logical_t, file_isDirectory, CSTRING, name)
 
 RexxMethod1 (logical_t, file_isFile, CSTRING, name)
 
 RexxMethod1 (logical_t, file_isHidden, CSTRING, name)
 
 RexxMethod1 (int64_t, file_get_last_modified, CSTRING, name)
 
 RexxMethod2 (logical_t, file_set_last_modified, CSTRING, name, int64_t, time)
 
 RexxMethod1 (logical_t, file_set_read_only, CSTRING, name)
 
 RexxMethod1 (uint64_t, file_length, CSTRING, name)
 
 RexxMethod1 (RexxObjectPtr, file_list, CSTRING, name)
 
 RexxMethod1 (logical_t, file_make_dir, CSTRING, name)
 
 RexxMethod2 (logical_t, file_rename, CSTRING, fromName, CSTRING, toName)
 

Function Documentation

◆ RexxMethod0() [1/4]

RexxMethod0 ( CSTRING  ,
file_path_separator   
)

Return the separator used for file search paths

Definition at line 63 of file FileNative.cpp.

References SysFileSystem::getPathSeparator().

◆ RexxMethod0() [2/4]

RexxMethod0 ( CSTRING  ,
file_separator   
)

Return the file name separator used by the file system.

Definition at line 55 of file FileNative.cpp.

References SysFileSystem::getSeparator().

◆ RexxMethod0() [3/4]

RexxMethod0 ( logical_t  ,
file_case_sensitive   
)

Return the file system case sensitivity section

Definition at line 72 of file FileNative.cpp.

References SysFileSystem::isCaseSensitive().

◆ RexxMethod0() [4/4]

RexxMethod0 ( RexxArrayObject  ,
file_list_roots   
)

Return the list of file system root elements.

Definition at line 99 of file FileNative.cpp.

References SysFileSystem::getRoots(), and SysFileSystem::MaximumPathLength.

◆ RexxMethod1() [1/14]

RexxMethod1 ( int64_t  ,
file_get_last_modified  ,
CSTRING  ,
name   
)

Return the last modified date as a Ticks time value.

Definition at line 187 of file FileNative.cpp.

References SysFileSystem::getLastModifiedDate().

◆ RexxMethod1() [2/14]

RexxMethod1 ( logical_t  ,
file_can_read  ,
CSTRING  ,
name   
)

Return the file system case sensitivity section

Definition at line 81 of file FileNative.cpp.

References SysFileSystem::exists(), and SysFileSystem::isWriteOnly().

◆ RexxMethod1() [3/14]

RexxMethod1 ( logical_t  ,
file_can_write  ,
CSTRING  ,
name   
)

Return the file system case sensitivity section

Definition at line 90 of file FileNative.cpp.

References SysFileSystem::exists(), and SysFileSystem::isReadOnly().

◆ RexxMethod1() [4/14]

RexxMethod1 ( logical_t  ,
file_delete_directory  ,
CSTRING  ,
name   
)

Delete a directory

Definition at line 151 of file FileNative.cpp.

References SysFileSystem::deleteDirectory().

◆ RexxMethod1() [5/14]

RexxMethod1 ( logical_t  ,
file_delete_file  ,
CSTRING  ,
name   
)

Delete a file

Definition at line 142 of file FileNative.cpp.

References SysFileSystem::deleteFile().

◆ RexxMethod1() [6/14]

RexxMethod1 ( logical_t  ,
file_exists  ,
CSTRING  ,
name   
)

Test if the file exists

Definition at line 133 of file FileNative.cpp.

References SysFileSystem::exists().

◆ RexxMethod1() [7/14]

RexxMethod1 ( logical_t  ,
file_isDirectory  ,
CSTRING  ,
name   
)

Tests if the file is a directory

Definition at line 160 of file FileNative.cpp.

References SysFileSystem::isDirectory().

◆ RexxMethod1() [8/14]

RexxMethod1 ( logical_t  ,
file_isFile  ,
CSTRING  ,
name   
)

Tests if the file is a file

Definition at line 169 of file FileNative.cpp.

References SysFileSystem::isFile().

◆ RexxMethod1() [9/14]

RexxMethod1 ( logical_t  ,
file_isHidden  ,
CSTRING  ,
name   
)

Tests if the file hidden

Definition at line 178 of file FileNative.cpp.

References SysFileSystem::isHidden().

◆ RexxMethod1() [10/14]

RexxMethod1 ( logical_t  ,
file_make_dir  ,
CSTRING  ,
name   
)

Make a directory instance

Definition at line 252 of file FileNative.cpp.

References SysFileSystem::makeDirectory().

◆ RexxMethod1() [11/14]

RexxMethod1 ( logical_t  ,
file_set_read_only  ,
CSTRING  ,
name   
)

Set the read-only flag for the target file

Definition at line 205 of file FileNative.cpp.

References SysFileSystem::setFileReadOnly().

◆ RexxMethod1() [12/14]

RexxMethod1 ( RexxObjectPtr  ,
file_list  ,
CSTRING  ,
name   
)

Get a list of the file children for a directory.

Definition at line 223 of file FileNative.cpp.

References SysFileIterator::hasNext(), SysFileSystem::isDirectory(), SysFileSystem::MaximumPathLength, and SysFileIterator::next().

◆ RexxMethod1() [13/14]

RexxMethod1 ( RexxStringObject  ,
file_qualify  ,
CSTRING  ,
name   
)

Create a fully-qualified path name for a file.

Definition at line 120 of file FileNative.cpp.

References SysFileSystem::MaximumFileNameLength, and SysFileSystem::qualifyStreamName().

◆ RexxMethod1() [14/14]

RexxMethod1 ( uint64_t  ,
file_length  ,
CSTRING  ,
name   
)

Return the last modified date as a Ticks time value.

Definition at line 214 of file FileNative.cpp.

References SysFileSystem::getFileLength().

◆ RexxMethod2() [1/2]

RexxMethod2 ( logical_t  ,
file_rename  ,
CSTRING  ,
fromName  ,
CSTRING  ,
toName   
)

Rename a file.

Definition at line 261 of file FileNative.cpp.

References SysFileSystem::moveFile().

◆ RexxMethod2() [2/2]

RexxMethod2 ( logical_t  ,
file_set_last_modified  ,
CSTRING  ,
name  ,
int64_t  ,
time   
)

Return the last modified date as a Ticks time value.

Definition at line 196 of file FileNative.cpp.

References SysFileSystem::setLastModifiedDate().