String path = new DirectoryInfo (".. /"). fullname;//the parent directory of the current application pathYou can use Appdomain.currentdomain.basedirectory to get the current directory.Gets the parent directory of the current directory
Source of the problem:Log on to the server (a server account in the lab), want to create a file in the current directory, but prompt "file system Read Only", unable to create the file. by ls-lView the current user's permissions in the current
The following shows that Tomcat made an error when deleting owner's own document, prompting permission denied.This is because user Tomcat does not have W permissions in the document's parent directory permissions. Although Tomcat is the owner of the
When we switch the parent directory on a Linux server, the CD is usually used. /.. /, there are several levels of directories to enter a few times ". /"If the directory is too deep to nest, it will be a bit of a dizzy dish ... Therefore, this
This article mainly introduces Python to obtain the current directory and the implementation of the parent directory, the need for friends can refer to the following
Gets the path to the current file:
From OS import path d = path.dirname
[Go] Original address: http://blog.csdn.net/liuweiyuxiang/article/details/71154346Gets the path to the current file: from Import Path = Path.dirname (__file__) # returns the directory where the current file is located # __file__ is the
How to represent a parent directory.. /indicates the directory where the source file is located, at the top level of the directory. /.. /represents the upper parent directory of the directory where the source file resides, and so on.Suppose the info.
First, I executed the following command.
dpd create sportsstoredpd -p 5500 sportsstore/app.dpddashboard
The above command works fine, but I need to go back to the parent directory to execute another command, but with a CD. Unable to return to the
In HTML: /indicates the directory where the source file is located, at the top level of the directory. /.. /represents the upper parent directory of the directory where the source file resides, similar to the upper directory.If chap1.html in
How do I get the path back to the parent directory?
What does a file in the admin and date admin directories do require a file in the date directory?
Require (DirName (__file__).. /date/my_class.php ")
------Solution--------------------
Figure
Batch Bat command--get current drive letter and current directory and parent directoryBatch command gets current drive letter and current directory%~D0 is the current drive letter%cd% is the current directoryCan print test with echo%cd%The following
Method One: First obtain the length of the folder in which the current file is located, and then use substr to intercept the length:
Copy the Code code as follows:
$dirName = str_replace ("\ \", "/", DirName (__file__));$dirNameLength = strlen
Today, do a test that would like to refer to the upper directory in the current Python module; Uh, a search.Let's look at the directory situation:[Email protected] test]# tree.├──t1.py├──t2│└──t2.py└──xxu└──test.py2 directories, 3 filesIn fact, the
This article summarizes the use of PHP to get the current file directory of the parent directory of 2 ways, and attached to the PHP get path and directory related functions, the need for small partners can refer to the following
method One: first
Batch Bat command--get current drive letter and current directory and parent directoryBatch command gets current drive letter and current directory%~D0 is the current drive letter%cd% is the current directoryCan print test with echo%cd%The following
$ Brew Install Php70-mcryptError:Error:parent directory is world writable and not stickySearch for the answers to GitHubhttps://github.com/Homebrew/legacy-homebrew/issues/40345Reason:/tmp directory permissions are incorrect$ ls-ld/private/tmpPrint
quantity in Demand: is 0, do not show and ; quantity is 0, do not show 1.html Code//Divclass= "MyPerson"ID= "mypersonBtn">People ManagementDiv>Divclass= "mypersonClass"ID= "mypersonId"> b>Spring and autumn Five tyrantsb> ul> ul>
We create a folder under root and create a file under that folder, so what does the other user have to do with the file's permissions? Let's explore the impact of the parent directory's permissions on the child file.
First, create the test folder
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.