When programming, use "\" as the path separator-general Linux technology-Linux programming and kernel information. The following is a detailed description. Note that when writing the code for creating a file, use "\" in the path of the windows
Path separator:
Under Windows is "\"
Under the Unix|linux is "/"
Considering the portability of the program, it is recommended that you choose "/" When you create the file, because it is OK to use "/" in the Windows platform when you create the
The path delimiter of PHP in windows and LINUX-Linux Enterprise Application-Linux server application information. For details, refer to the following section. As we all know, What Is \ and/in windows, while what is in LINUX is/
The program runs
1. How to obtain the current file path
Frequently used:
String type: system. getproperty ("user. dir ");
Overall:
Package com. zcjl. Test. base;Import java. Io. file;Public class test {Public static void main (string [] ARGs) throws exception
1. How to obtain the current file path
Frequently used:
String type: system. getproperty ("user. dir ");
Overall:
Package com. zcjl. Test. base;Import java. Io. file;Public class test {Public static void main (string [] ARGs) throws exception
To describe the location of a file, you can use a summary path and a relative path. An absolute path is a first-level entry from the root to each subdirectory, and the file name or directory name is finally specified. The relative directory enters a
It mainly uses the properties class in the util package provided by Java. Let's talk about the Code:
View plaincopy to clipboardprint?Import java. util .*;
Public class yourjavaproperties {Public static void main (string ARGs []) {Properties props =
Problem
The line separator, the path separator, and so on, are often different under different system platforms. Such as
Copy Code code as follows:
Row delimiters under Windows are \ r \ n, under Linux \ n, under Mac \ r
The path
IO (File recursion), iofile Recursion
File OverviewJava. io. File class: abstract representation of File and directory path names.Used to describe files, folders, and paths on a computer Commonly used three File-related words:File: fileDirectory:
Today, I am reading a demo of yaf of laruence. In the entry FILE, the author has the following definition: define (DS,); define (APP_PATH, dirname (_ FILE __). DS .... DS. application. DS); the author means that DS is defined as the path separator.
Welcome to the Linux community forum and interact with 2 million technicians to enter different operating systems with different symbols. How can we write PHP code so that we can port it in different operating systems? 1. DIRETORY_SEPORATOR default
Summary of FileSystemObject object members
The FileSystemObject object provides an attribute and a series of methods to manipulate some of the dependent objects implemented by the FileSystemObject object. Here we provide a summary of all the content,
Introduction to File. separator separators (Java ),
In windows, the path separator is different from the path Separator in Linux. When the absolute path is used directly, baolu across platforms will expose "no suchffile or directory ", this is often
What is cross-platform?
A simple example is that the program you write can run in windows and can run in linux after simple processing.
Standard definition: A program language, software, or hardware device can operate on multiple operating systems
I. Preprocessing macros
1. General macros
In vc6.0:
Project setting à C/C ++ à Preprocessor Definitions
In vc2005:
Project property à configuration property à C/C ++ à pre-processor Definition
Win32: Indicates the Windows 32-bit system compiler,
Role of DIRECTORY_SEPARATOR. DIRECTORY_SEPARATOR is an internal constant of php. it is used to display system separator commands and can be directly used without any definition or inclusion. In windows, the path separator is (of course, some
Function of DIRECTORY_SEPARATOR in PHP, phppathseparator
DIRECTORY_SEPARATOR is an internal constant of php. It is used to display system separator commands and can be directly used without any definition or inclusion.
In windows, the path separator
Details about the use and skills of the front-end build tool gulpjs, and details about gulpjs
Gulpjs is a front-end build tool. Compared with gruntjs, gulpjs does not need to write a lot of complicated configuration parameters. APIs are also very
In Java, the system. getproperty () parameter is as follows:
Java. Version JavaRuntime Environment versionJava. Vendor JavaRuntime Environment vendorJava. Vendor. url JavaVendor URLJava. Home JavaInstallation DirectoryJava. VM. Specification.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.