| | 174 | =head1 METHODS |
|---|
| | 175 | |
|---|
| | 176 | =head2 $fm->can_write($file) |
|---|
| | 177 | |
|---|
| | 178 | The given file is writable. |
|---|
| | 179 | |
|---|
| | 180 | =head2 $fm->content_is_updated($file, $content) |
|---|
| | 181 | |
|---|
| | 182 | Returns true if the file does not exist or the contents have changed |
|---|
| | 183 | with respect to the given C<content>. |
|---|
| | 184 | |
|---|
| | 185 | =head2 $fm->delete($file) |
|---|
| | 186 | |
|---|
| | 187 | Delete the given file and return a translated error on failure. |
|---|
| | 188 | |
|---|
| | 189 | =head2 $fm->exists($file) |
|---|
| | 190 | |
|---|
| | 191 | The given file exists. |
|---|
| | 192 | |
|---|
| | 193 | =head2 $fm->get_data($from[, $type]) |
|---|
| | 194 | |
|---|
| | 195 | Fetch and return the file contents given by <$from>. |
|---|
| | 196 | This method also accepts an optional C<type> argument, such as |
|---|
| | 197 | 'upload', wich indicates that we sould set perl's C<binmode>. |
|---|
| | 198 | |
|---|
| | 199 | =head2 $fm->mkpath($path) |
|---|
| | 200 | |
|---|
| | 201 | Create the given path and return a translated error on failure. |
|---|
| | 202 | |
|---|
| | 203 | =head2 $fm->put($from, $to[, $type]) |
|---|
| | 204 | |
|---|
| | 205 | Write the file, or file handle contents, given by C<$from> to C<$to> |
|---|
| | 206 | and calls the C<put_data> method, detailed below. |
|---|
| | 207 | |
|---|
| | 208 | =head2 $fm->put_data($from, $to[, $type]) |
|---|
| | 209 | |
|---|
| | 210 | Write the non-file-handle contents, given by C<$from> to C<$to>. This |
|---|
| | 211 | method also accepts an optional C<type> argument, such as 'upload', |
|---|
| | 212 | which sets C<UploadUmask> and C<UploadPerms>. If not given, |
|---|
| | 213 | C<HTMLUmask> and <HTMLPerms> are set instead. |
|---|
| | 214 | |
|---|
| | 215 | =head2 $fm->rename($from, $to) |
|---|
| | 216 | |
|---|
| | 217 | Rename the given file to the given new name and return a translated |
|---|
| | 218 | error on failure. |
|---|
| | 219 | |
|---|