file.size {file} R Documentation

Extract File Information

Description


Utility function to extract information about files on the user's file systems.

Usage

file.size(x);

Arguments

x

character vectors containing file paths. Tilde-expansion is done: see path.expand.

Details

What constitutes a ‘file’ is OS-dependent but includes directories. (However, directory names must not include a trailing backslash or slash on Windows.) See also the section in the help for file.exists on case-insensitive file systems. The file 'mode’ follows POSIX conventions, giving three octal digits summarizing the permissions for the file owner, the owner's group and for anyone respectively. Each digit is the logical or of read (4), write (2) and execute/search (1) permissions. See files For how file paths With marked encodings are interpreted. File modes are probably only useful On NTFS file systems, And it seems all three digits refer To the file's owner. The execute/search bits are set for directories, and for files based on their extensions (e.g., ‘.exe’, ‘.com’, ‘.cmd’ and ‘.bat’ files). file.access will give a more reliable view of read/write access availability to the R process. UTF-8-encoded file names Not valid in the current locale can be used. Junction points And symbolic links are followed, so information Is given about the file/directory To which the link points rather than about the link.

Authors

SMRUCC genomics Institute

Value

Double: File size In bytes. For missing file, this function will returns a negative number -1; and the file is exists on the filesystem, this function returns ZERO(empty file) or a positive number.

clr value class

Examples


[Package file version 2.33.856.6961 Index]