⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.116
Server IP:
78.40.11.138
Server:
Linux tango.o2switch.net 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
alt
/
ruby19
/
share
/
ri
/
1.9.1
/
system
/
String
/
View File Name :
pathmap-i.ri
U:RDoc::AnyMethod[iI"pathmap:EFI"String#pathmap;FF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"JMap the path according to the given specification. The specification;TI"Mcontrols the details of the mapping. The following special patterns are;TI"recognized:;To:RDoc::Markup::BlankLine o:RDoc::Markup::List: @type:BULLET:@items[ o:RDoc::Markup::ListItem:@label0; [o; ; [I"$<b>%p</b> -- The complete path.;To;;0; [o; ; [I"J<b>%f</b> -- The base file name of the path, with its file extension,;TI"!but without any directories.;To;;0; [o; ; [I"G<b>%n</b> -- The file name of the path without its file extension.;To;;0; [o; ; [I"1<b>%d</b> -- The directory list of the path.;To;;0; [o; ; [I"K<b>%x</b> -- The file extension of the path. An empty string if there;TI"is no extension.;To;;0; [o; ; [I"6<b>%X</b> -- Everything *but* the file extension.;To;;0; [o; ; [I"H<b>%s</b> -- The alternate file separator if defined, otherwise use;TI"!the standard file separator.;To;;0; [o; ; [I"!<b>%%</b> -- A percent sign.;T@o; ; [ I"IThe %d specifier can also have a numeric prefix (e.g. '%2d'). If the;TI"Inumber is positive, only return (up to) +n+ directories in the path,;TI"Jstarting from the left hand side. If +n+ is negative, return (up to);TI"<|+n+| directories from the right hand side of the path.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [I"2'a/b/c/d/file.txt'.pathmap("%2d") => 'a/b' ;FI"2'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d' ;Fo; ; [I"=Also the %d, %p, %f, %n, %x, and %X operators can take a;TI"Mpattern/replacement argument to perform simple string substitutions on a;TI"Lparticular part of the path. The pattern and replacement are separated;TI"Mby a comma and are enclosed by curly braces. The replacement spec comes;TI"Aafter the % character but before the operator letter. (e.g.;TI"G"%{old,new}d"). Multiple replacement specs should be separated by;TI".semi-colons (e.g. "%{old,new;src,bin}d").;T@o; ; [ I"JRegular expressions may be used for the pattern, and back refs may be;TI"Lused in the replacement text. Curly braces, commas and semi-colons are;TI"Lexcluded from both the pattern and replacement text (let's keep parsing;TI"reasonable).;T@o; ; [I"For example:;T@o;; [I"E"src/org/onestepback/proj/A.java".pathmap("%{^src,bin}X.class") ;Fo; ; [I" returns:;T@o;; [I"("bin/org/onestepback/proj/A.class" ;Fo; ; [I"LIf the replacement text is '*', then a block may be provided to perform;TI"4some arbitrary calculation for the replacement.;T@o; ; [I"For example:;T@o;; [I"7"/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext| ;FI" ext.downcase ;FI"} ;Fo; ; [I" Returns:;T@o;; [I""/path/to/file.txt";F: @file000[ I"(spec=nil, &block);TI"lib/rake/ext/string.rb;T