Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Stat a symbolic linkOpen a file, pipe, or descriptor (Berikutnya)
Functions for filehandles, files, or directories

Create a directory

Daftar Isi

  • mkdir FILENAME,MASK

  • mkdir FILENAME
  • mkdir

    Creates the directory specified by FILENAME, with permissionsspecified by MASK (as modified by umask). If it succeeds itreturns true; otherwise it returns false and sets $! (errno).MASK defaults to 0777 if omitted, and FILENAME defaultsto $_ if omitted.

    In general, it is better to create directories with a permissive MASKand let the user modify that with their umask than it is to supplya restrictive MASK and give the user no way to be more permissive.The exceptions to this rule are when the file or directory should bekept private (mail files, for instance). The perlfunc(1) entry onumask discusses the choice of MASK in more detail.

    Note that according to the POSIX 1003.1-1996 the FILENAME may have anynumber of trailing slashes. Some operating and filesystems do not getthis right, so Perl automatically removes all trailing slashes to keepeveryone happy.

    To recursively create a directory structure, look atthe mkpath function of the File::Path module.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Stat a symbolic linkOpen a file, pipe, or descriptor (Berikutnya)