Drupal\helper\File\YamlFile
Helper for working with JSON files.
Implements:
Stringable
Extend:
Drupal\helper\File\File
Methods
| Name | Description |
|---|---|
Inherited methods
| Name | Description |
|---|---|
| __construct | File constructor. |
| __debugInfo | - |
| __toString | Returns the path to the file as a string |
| _bad_state_ex | - |
| decodeData | Decode a file's contents into data. |
| encodeData | Encode data for file content. |
| getATime | Gets last access time of the file |
| getBasename | Gets the base name of the file |
| getCTime | Gets the inode change time |
| getExtension | Gets the file extension |
| getFileInfo | Gets an SplFileInfo object for the file |
| getFilename | Gets the filename |
| getGroup | Gets the file group |
| getInode | Gets the inode for the file |
| getLinkTarget | Gets the target of a link |
| getMTime | Gets the last modified time |
| getOwner | Gets the owner of the file |
| getPath | Gets the path without filename |
| getPathInfo | Gets an SplFileInfo object for the path |
| getPathname | Gets the path to the file |
| getPerms | Gets file permissions |
| getRealPath | Gets absolute path to file |
| getSize | Gets file size |
| getType | Gets file type |
| isDir | Tells if the file is a directory |
| isExecutable | Tells if the file is executable |
| isFile | Tells if the object references a regular file |
| isLink | Tells if the file is a link |
| isReadable | Tells if file is readable |
| isWritable | Tells if the entry is writable |
| openFile | Gets an SplFileObject object for the file |
| readData | Gets contents of a file. |
| setFileClass | Sets the class used with SplFileInfo::openFile |
| setInfoClass | Sets the class used with SplFileInfo::getFileInfo and SplFileInfo::getPathInfo |
| validateReadable | Validates that the directory is and file are readable. |
| validateWritable | Validates that the directory and file are both writable. |
| writeData | Writes contents to a file. |