亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? copy.pm

?? UNIX下perl實現代碼
?? PM
字號:
# File/Copy.pm. Written in 1994 by Aaron Sherman <ajs@ajs.com>. This# source code has been placed in the public domain by the author.# Please be kind and preserve the documentation.## Additions copyright 1996 by Charles Bailey.  Permission is granted# to distribute the revised code under the same terms as Perl itself.package File::Copy;use 5.005_64;use strict;use Carp;our(@ISA, @EXPORT, @EXPORT_OK, $VERSION, $Too_Big, $Syscopy_is_copy);sub copy;sub syscopy;sub cp;sub mv;# Note that this module implements only *part* of the API defined by# the File/Copy.pm module of the File-Tools-2.0 package.  However, that# package has not yet been updated to work with Perl 5.004, and so it# would be a Bad Thing for the CPAN module to grab it and replace this# module.  Therefore, we set this module's version higher than 2.0.$VERSION = '2.03';require Exporter;@ISA = qw(Exporter);@EXPORT = qw(copy move);@EXPORT_OK = qw(cp mv);$Too_Big = 1024 * 1024 * 2;sub _catname { #  Will be replaced by File::Spec when it arrives    my($from, $to) = @_;    if (not defined &basename) {	require File::Basename;	import  File::Basename 'basename';    }    if ($^O eq 'VMS')  { $to = VMS::Filespec::vmspath($to) . basename($from); }    elsif ($^O eq 'MacOS') { $to =~ s/^([^:]+)$/:$1/; $to .= ':' . basename($from); }    elsif ($to =~ m|\\|)   { $to .= '\\' . basename($from); }    else                   { $to .= '/' . basename($from); }}sub copy {    croak("Usage: copy(FROM, TO [, BUFFERSIZE]) ")      unless(@_ == 2 || @_ == 3);    my $from = shift;    my $to = shift;    my $from_a_handle = (ref($from)			 ? (ref($from) eq 'GLOB'			    || UNIVERSAL::isa($from, 'GLOB')                            || UNIVERSAL::isa($from, 'IO::Handle'))			 : (ref(\$from) eq 'GLOB'));    my $to_a_handle =   (ref($to)			 ? (ref($to) eq 'GLOB'			    || UNIVERSAL::isa($to, 'GLOB')                            || UNIVERSAL::isa($to, 'IO::Handle'))			 : (ref(\$to) eq 'GLOB'));    if (!$from_a_handle && !$to_a_handle && -d $to && ! -d $from) {	$to = _catname($from, $to);    }    if (defined &syscopy && !$Syscopy_is_copy	&& !$to_a_handle	&& !($from_a_handle && $^O eq 'os2' )	# OS/2 cannot handle handles	&& !($from_a_handle && $^O eq 'mpeix')	# and neither can MPE/iX.	&& !($from_a_handle && $^O eq 'MSWin32')	&& !($from_a_handle && $^O eq 'MacOS')       )    {	return syscopy($from, $to);    }    my $closefrom = 0;    my $closeto = 0;    my ($size, $status, $r, $buf);    local(*FROM, *TO);    local($\) = '';    if ($from_a_handle) {	*FROM = *$from{FILEHANDLE};    } else {	$from = _protect($from) if $from =~ /^\s/s;	open(FROM, "< $from\0") or goto fail_open1;	binmode FROM or die "($!,$^E)";	$closefrom = 1;    }    if ($to_a_handle) {	*TO = *$to{FILEHANDLE};    } else {	$to = _protect($to) if $to =~ /^\s/s;	open(TO,"> $to\0") or goto fail_open2;	binmode TO or die "($!,$^E)";	$closeto = 1;    }    if (@_) {	$size = shift(@_) + 0;	croak("Bad buffer size for copy: $size\n") unless ($size > 0);    } else {	$size = -s FROM;	$size = 1024 if ($size < 512);	$size = $Too_Big if ($size > $Too_Big);    }    $! = 0;    for (;;) {	my ($r, $w, $t);	defined($r = sysread(FROM, $buf, $size))	    or goto fail_inner;	last unless $r;	for ($w = 0; $w < $r; $w += $t) {	    $t = syswrite(TO, $buf, $r - $w, $w)		or goto fail_inner;	}    }    close(TO) || goto fail_open2 if $closeto;    close(FROM) || goto fail_open1 if $closefrom;    # Use this idiom to avoid uninitialized value warning.    return 1;    # All of these contortions try to preserve error messages...  fail_inner:    if ($closeto) {	$status = $!;	$! = 0;	close TO;	$! = $status unless $!;    }  fail_open2:    if ($closefrom) {	$status = $!;	$! = 0;	close FROM;	$! = $status unless $!;    }  fail_open1:    return 0;}sub move {    my($from,$to) = @_;    my($copied,$fromsz,$tosz1,$tomt1,$tosz2,$tomt2,$sts,$ossts);    if (-d $to && ! -d $from) {	$to = _catname($from, $to);    }    ($tosz1,$tomt1) = (stat($to))[7,9];    $fromsz = -s $from;    if ($^O eq 'os2' and defined $tosz1 and defined $fromsz) {      # will not rename with overwrite      unlink $to;    }    return 1 if rename $from, $to;    ($sts,$ossts) = ($! + 0, $^E + 0);    # Did rename return an error even though it succeeded, because $to    # is on a remote NFS file system, and NFS lost the server's ack?    return 1 if defined($fromsz) && !-e $from &&           # $from disappeared                (($tosz2,$tomt2) = (stat($to))[7,9]) &&    # $to's there                ($tosz1 != $tosz2 or $tomt1 != $tomt2) &&  #   and changed                $tosz2 == $fromsz;                         # it's all there    ($tosz1,$tomt1) = (stat($to))[7,9];  # just in case rename did something    return 1 if ($copied = copy($from,$to)) && unlink($from);    ($tosz2,$tomt2) = ((stat($to))[7,9],0,0) if defined $tomt1;    unlink($to) if !defined($tomt1) or $tomt1 != $tomt2 or $tosz1 != $tosz2;    ($!,$^E) = ($sts,$ossts);    return 0;}*cp = \&copy;*mv = \&move;if ($^O eq 'MacOS') {    *_protect = sub { MacPerl::MakeFSSpec($_[0]) };} else {    *_protect = sub { "./$_[0]" };}# &syscopy is an XSUB under OS/2unless (defined &syscopy) {    if ($^O eq 'VMS') {	*syscopy = \&rmscopy;    } elsif ($^O eq 'mpeix') {	*syscopy = sub {	    return 0 unless @_ == 2;	    # Use the MPE cp program in order to	    # preserve MPE file attributes.	    return system('/bin/cp', '-f', $_[0], $_[1]) == 0;	};    } elsif ($^O eq 'MSWin32') {	*syscopy = sub {	    return 0 unless @_ == 2;	    return Win32::CopyFile(@_, 1);	};    } elsif ($^O eq 'MacOS') {	require Mac::MoreFiles;	*syscopy = sub {	    my($from, $to) = @_;	    my($dir, $toname);	    return 0 unless -e $from;	    if ($to =~ /(.*:)([^:]+):?$/) {		($dir, $toname) = ($1, $2);	    } else {		($dir, $toname) = (":", $to);	    }	    unlink($to);	    Mac::MoreFiles::FSpFileCopy($from, $dir, $toname, 1);	};    } else {	$Syscopy_is_copy = 1;	*syscopy = \&copy;    }}1;__END__=head1 NAMEFile::Copy - Copy files or filehandles=head1 SYNOPSIS  	use File::Copy;	copy("file1","file2");  	copy("Copy.pm",\*STDOUT);'	move("/dev1/fileA","/dev2/fileB");  	use POSIX;	use File::Copy cp;	$n = FileHandle->new("/a/file","r");	cp($n,"x");'=head1 DESCRIPTIONThe File::Copy module provides two basic functions, C<copy> andC<move>, which are useful for getting the contents of a file fromone place to another.=over 4=item *The C<copy> function takes twoparameters: a file to copy from and a file to copy to. Eitherargument may be a string, a FileHandle reference or a FileHandleglob. Obviously, if the first argument is a filehandle of somesort, it will be read from, and if it is a file I<name> it willbe opened for reading. Likewise, the second argument will bewritten to (and created if need be).B<Note that passing infiles as handles instead of names may lead to loss of informationon some operating systems; it is recommended that you use filenames whenever possible.>  Files are opened in binary mode whereapplicable.  To get a consistent behaviour when copying from afilehandle to a file, use C<binmode> on the filehandle.An optional third parameter can be used to specify the buffersize used for copying. This is the number of bytes from thefirst file, that wil be held in memory at any given time, beforebeing written to the second file. The default buffer size dependsupon the file, but will generally be the whole file (up to 2Mb), or1k for filehandles that do not reference files (eg. sockets).You may use the syntax C<use File::Copy "cp"> to get at the"cp" alias for this function. The syntax is I<exactly> the same.=item *The C<move> function also takes two parameters: the current nameand the intended name of the file to be moved.  If the destinationalready exists and is a directory, and the source is not adirectory, then the source file will be renamed into the directoryspecified by the destination.If possible, move() will simply rename the file.  Otherwise, it copiesthe file to the new location and deletes the original.  If an error occursduring this copy-and-delete process, you may be left with a (possibly partial)copy of the file under the destination name.You may use the "mv" alias for this function in the same way thatyou may use the "cp" alias for C<copy>.=backFile::Copy also provides the C<syscopy> routine, which copies thefile specified in the first parameter to the file specified in thesecond parameter, preserving OS-specific attributes and filestructure.  For Unix systems, this is equivalent to the simpleC<copy> routine.  For VMS systems, this calls the C<rmscopy>routine (see below).  For OS/2 systems, this calls the C<syscopy>XSUB directly. For Win32 systems, this calls C<Win32::CopyFile>.=head2 Special behaviour if C<syscopy> is defined (OS/2, VMS and Win32)If both arguments to C<copy> are not file handles,then C<copy> will perform a "system copy" ofthe input file to a new output file, in order to preserve fileattributes, indexed file structure, I<etc.>  The buffer sizeparameter is ignored.  If either argument to C<copy> is ahandle to an opened file, then data is copied using Perloperators, and no effort is made to preserve file attributesor record structure.The system copy routine may also be called directly under VMS and OS/2as C<File::Copy::syscopy> (or under VMS as C<File::Copy::rmscopy>, whichis the routine that does the actual work for syscopy).=over 4=item rmscopy($from,$to[,$date_flag])The first and second arguments may be strings, typeglobs, typeglobreferences, or objects inheriting from IO::Handle;they are used in all cases to obtain theI<filespec> of the input and output files, respectively.  Thename and type of the input file are used as defaults for theoutput file, if necessary.A new version of the output file is always created, whichinherits the structure and RMS attributes of the input file,except for owner and protections (and possibly timestamps;see below).  All data from the input file is copied to theoutput file; if either of the first two parameters to C<rmscopy>is a file handle, its position is unchanged.  (Note that thismeans a file handle pointing to the output file will beassociated with an old version of that file after C<rmscopy>returns, not the newly created version.)The third parameter is an integer flag, which tells C<rmscopy>how to handle timestamps.  If it is E<lt> 0, none of the input file'stimestamps are propagated to the output file.  If it is E<gt> 0, thenit is interpreted as a bitmask: if bit 0 (the LSB) is set, thentimestamps other than the revision date are propagated; if bit 1is set, the revision date is propagated.  If the third parameterto C<rmscopy> is 0, then it behaves much like the DCL COPY command:if the name or type of the output file was explicitly specified,then no timestamps are propagated, but if they were taken implicitlyfrom the input filespec, then all timestamps other than therevision date are propagated.  If this parameter is not supplied,it defaults to 0.Like C<copy>, C<rmscopy> returns 1 on success.  If an error occurs,it sets C<$!>, deletes the output file, and returns 0.=back=head1 RETURNAll functions return 1 on success, 0 on failure.$! will be set if an error was encountered.=head1 AUTHORFile::Copy was written by Aaron Sherman I<E<lt>ajs@ajs.comE<gt>> in 1995,and updated by Charles Bailey I<E<lt>bailey@newman.upenn.eduE<gt>> in 1996.=cut

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产精品久久| 国产人成一区二区三区影院| 亚洲精品伦理在线| 懂色av中文字幕一区二区三区 | 欧美四级电影网| 一区视频在线播放| 成a人片国产精品| 国产精品久久久久久久久免费相片 | 亚洲第一主播视频| 在线看日韩精品电影| 亚洲综合免费观看高清在线观看| 91美女福利视频| 亚洲精品国产无天堂网2021| 91浏览器打开| 亚洲中国最大av网站| 欧美伊人久久大香线蕉综合69 | 国产精品国产精品国产专区不片| 成人在线一区二区三区| 亚洲国产精品国自产拍av| 成人中文字幕在线| 国产精品女人毛片| 91在线观看视频| 伊人婷婷欧美激情| 欧美色综合久久| 日韩成人免费看| 精品久久久久久无| 国产精品一区一区三区| 国产日产亚洲精品系列| av一区二区三区四区| 亚洲精品国产无套在线观| 欧美日韩国产一区二区三区地区| 日日夜夜免费精品| 欧美videos大乳护士334| 国产精品99久久久久久有的能看 | 欧美变态tickling挠脚心| 精品一区二区在线免费观看| 久久久不卡影院| www.色精品| 亚洲丶国产丶欧美一区二区三区| 日韩一区二区在线看片| 国产乱淫av一区二区三区| 国产精品网站在线观看| 91极品美女在线| 日本成人在线一区| 久久久国际精品| 99国产精品久| 肉色丝袜一区二区| 久久精品亚洲精品国产欧美| 91免费视频大全| 日本成人在线视频网站| 国产日韩v精品一区二区| 在线观看91视频| 乱中年女人伦av一区二区| 日本一区二区三级电影在线观看| 色呦呦国产精品| 日韩不卡手机在线v区| 久久精品日产第一区二区三区高清版 | 亚洲男人的天堂在线观看| 欧美日韩你懂的| 九色porny丨国产精品| 国产精品久久久久影院老司 | 国产欧美日韩麻豆91| 日本二三区不卡| 欧美亚洲一区二区三区四区| 美女脱光内衣内裤视频久久网站 | 精品国产免费一区二区三区香蕉| 成人动漫一区二区在线| 亚洲国产成人高清精品| 久久久精品免费免费| 欧美日韩日本视频| 不卡的电视剧免费网站有什么| 日本不卡一区二区三区| 国产精品伦一区二区三级视频| 欧美肥妇毛茸茸| av一区二区不卡| 麻豆久久久久久久| 亚洲美女视频一区| 久久久久久一二三区| 欧美日韩一区三区四区| 成人一区二区三区在线观看 | 亚洲久草在线视频| 精品国产一区二区三区久久影院| 一本色道**综合亚洲精品蜜桃冫| 精品一区二区三区久久久| 亚洲一区二区三区美女| 中文字幕乱码久久午夜不卡 | 国产性做久久久久久| 欧美在线观看一区| 成人性生交大片免费看中文 | 悠悠色在线精品| 国产亚洲人成网站| 日韩三级免费观看| 欧美性受xxxx黑人xyx性爽| 国产一区二区三区免费看| 五月天婷婷综合| 亚洲另类色综合网站| 国产午夜三级一区二区三| 日韩一区二区三区四区| 欧美亚日韩国产aⅴ精品中极品| 成人av资源下载| 国产经典欧美精品| 久国产精品韩国三级视频| 午夜影院在线观看欧美| 一区二区在线看| 亚洲同性同志一二三专区| 久久久久久久久99精品| 精品国偷自产国产一区| 91精品国产一区二区人妖| 欧美性一级生活| 欧美亚洲另类激情小说| 99国产一区二区三精品乱码| 成人午夜视频在线观看| 国产一区二区三区| 久久国产乱子精品免费女| 日韩影视精彩在线| 亚洲 欧美综合在线网络| 亚洲影院免费观看| 亚洲欧美日韩在线| 国产精品全国免费观看高清| 国产午夜一区二区三区| 久久日一线二线三线suv| 欧美xxxxxxxx| 久久亚洲精华国产精华液 | 中文字幕巨乱亚洲| 欧美国产国产综合| 国产精品欧美久久久久无广告 | 日韩欧美精品在线| 日韩精品专区在线| 精品国内二区三区| 久久久久久久久久久电影| 国产日韩一级二级三级| 国产欧美视频一区二区| 国产精品久久久一本精品 | 97超碰欧美中文字幕| 9人人澡人人爽人人精品| 国产91丝袜在线18| 成人aa视频在线观看| 91免费在线视频观看| 在线国产电影不卡| 欧美亚洲精品一区| 91精品久久久久久蜜臀| 日韩欧美国产精品一区| 精品国产免费久久 | 精品欧美一区二区久久| 精品日韩99亚洲| 久久先锋影音av| 国产精品欧美久久久久一区二区| 亚洲天堂福利av| 亚洲激情男女视频| 午夜精品久久久久久久蜜桃app| 日本美女视频一区二区| 国产在线观看一区二区| 国产91在线|亚洲| 亚洲猫色日本管| 亚洲一区二区三区免费视频| 日韩精品每日更新| 精品夜夜嗨av一区二区三区| 国产成人精品免费一区二区| 99综合电影在线视频| 欧美曰成人黄网| 91精品欧美一区二区三区综合在| 欧美不卡一区二区三区四区| 国产精品无人区| 亚洲国产成人av网| 久草这里只有精品视频| 成人黄色片在线观看| 在线观看一区二区精品视频| 日韩精品自拍偷拍| 中文字幕在线不卡| 日韩专区一卡二卡| 国产精品亚洲一区二区三区妖精 | 日韩成人一级大片| 国产成人99久久亚洲综合精品| 色妞www精品视频| 日韩欧美激情四射| 亚洲欧美在线aaa| 日韩av一区二| 成人午夜av影视| 欧美理论片在线| 中文字幕精品综合| 亚洲不卡在线观看| 国产精品亚洲成人| 欧美午夜精品一区二区三区| 欧美成人性战久久| 亚洲色大成网站www久久九九| 秋霞午夜av一区二区三区 | 黄色精品一二区| 91免费精品国自产拍在线不卡| 欧美一区二区三区白人| 国产精品午夜电影| 天堂一区二区在线| 成人va在线观看| 日韩午夜激情电影| 亚洲欧美激情小说另类| 麻豆国产精品官网| 91一区二区在线观看| 精品卡一卡二卡三卡四在线| 亚洲猫色日本管| 国产v日产∨综合v精品视频| 欧美乱妇20p|