Ruby wildcard file




















Updates modification time mtime and access time atime of file s in list. Files are created if they don't exist. Non-existent files are older than any file. Home Core 2. Home Classes Methods. In Files fileutils. FileUtils fileutils. Public Class Methods cd dir, verbose: nil click to toggle source. Changes the current directory to the directory dir.

Also aliased as: chdir. Absolute mode is FileUtils. File fileutils. Returns true if the contents of a file A and a file B are identical. Also aliased as: identical? Returns true if the contents of a stream a and b are identical. If src is a list of files, then dest must be a directory. Also aliased as: symlink. Same as FileUtils. Creates one or more directories. Creates a directory and all its parent directories. For example, FileUtils.

Also aliased as: mkpath , makedirs. Returns the name of the current directory. Also aliased as: getwd. Removing directory tree includes world writable directory. The system has symbolic link. For details of this security vulnerability, see Perl's case: www. If a file is being created, permission bits may be given in perm. These mode and permission bits are platform dependent; on Unix systems, see open 2 and chmod 2 man pages for details. The new File object is buffered mode or non-sync mode , unless filename is a tty.

With no associated block, File. If the optional code block is given, it will be passed the opened file as an argument and the File object will automatically be closed when the block terminates. The value of the block will be returned from File. If a file is being created, its initial permissions may be set using the perm parameter. See File. Returns true if the named file exists and the effective used id of the calling process is the owner of the file.

Returns true if the named file is readable by the effective user and group id of this process. Returns true if the named file is readable by the real user and group id of this process. Returns the real absolute pathname of pathname in the actual filesystem.

The real pathname doesn't contain symlinks or useless dots. Returns the real absolute pathname of pathname in the actual filesystem not containing symlinks or useless dots.

Renames the given file to the new name. Raises a SystemCallError if the file cannot be renamed. Splits the given string into a directory and a file component and returns them in a two-element array. See also File::dirname and File::basename. Raises a NotImplemented exception on platforms that do not support symbolic links. Returns the current umask value for this process.

If the optional argument is given, set the umask to that value and return the previous value. Umask values are subtracted from the default permissions, so a umask of would make a file read-only for everyone. If a file is a symlink, this method acts upon its referent rather than the link itself; for the inverse behavior see File. Returns nil otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat 2.

Returns true if the named file is writable by the effective user and group id of this process. Returns true if the named file is writable by the real user and group id of this process. Returns the last access time a Time object for file , or epoch if file has not been accessed. Actual effects are platform dependent; on Unix systems, see chmod 2 for details.

Follows symbolic links. Also see File lchmod. Changes the owner and group of file to the given numeric owner and group id's. See also File lchown. Returns the change time for file that is, the time directory information about the file was changed, not the file itself. Same as IO stat , but does not follow the last symbolic link. The pathname may not point to the file corresponding to file. For instance, the pathname becomes void when the file has been moved or deleted.

Truncates file to at most integer bytes. The file must be opened for writing. Home Core 2. Home Classes Methods. In Files dir. Parent IO. Files grammar. File A File is an abstraction of any file object accessible by the program and is closely associated with class IO. Returns the birth time for the named file. See also File::dirname and File::basename. Returns a File::Stat object for the named file see File::Stat. Raises a NotImplemented exception on platforms that do not support symbolic links.

Returns the current umask value for this process. If the optional argument is given, set the umask to that value and return the previous value. Umask values are subtracted from the default permissions, so a umask of would make a file read-only for everyone. If a file is a symlink, this method acts upon its referent rather than the link itself; for the inverse behavior see File.

Returns nil otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat 2. Returns true if the named file is writable by the effective user and group id of this process. Returns true if the named file is writable by the real user and group id of this process. Returns the last access time a Time object for file , or epoch if file has not been accessed. If the platform doesn't have birthtime, raises NotImplementedError. Actual effects are platform dependent; on Unix systems, see chmod 2 for details.

Follows symbolic links. Also see File lchmod. Changes the owner and group of file to the given numeric owner and group id's. See also File lchown. Returns the change time for file that is, the time directory information about the file was changed, not the file itself.

Same as IO stat , but does not follow the last symbolic link. The pathname may not point to the file corresponding to file. For instance, the pathname becomes void when the file has been moved or deleted. Truncates file to at most integer bytes. The file must be opened for writing. Hack your world. Feed your head. Live curious.

Home Core 3. Home Classes Methods. In Files dir. Parent IO. Files History. File A File is an abstraction of any file object accessible by the program and is closely associated with class IO. Returns whether the given path is the absolute file path. Times ::atime Returns a Time for the most recent access to the given file. Types ::blockdev? Returns whether the file at the given path is a block device. Returns whether the file at the given path is a character device. Returns whether the file at the given path is a diretory.

Returns whether the file at the given path exists. Returns whether the file at the given path is a regular file. Returns whether the effective group of the current process owns the file at the given path.

Returns whether the files at two given paths are identical. Returns whether the effective user of the current process owns the file at the given path.

Returns whether the file at the given path is a pipe. Returns whether the setgid bit is set for the file at the given path. Returns whether the setuid bit is set for the file at the given path. Returns whether the file at the given path is a socket. Returns whether the file at the given path has its sticky bit set. Returns whether the file at the given path is a symbolic link. Returns whether the file at the given path is readable by others.

Returns whether the file at the given path is writable by others. Contents ::empty? Returns whether the file at the given path exists and is empty. Returns true if the named file is a block device.

Returns true if the named file is a character device. See also Dir::rmdir. Returns true if the named file exists and has a zero size.



0コメント

  • 1000 / 1000