27 Commits

Author SHA1 Message Date
dwitte%stanford.edu
7b5fcb3785 make nsSafeFileOutputStream follow target symlinks.
b=252050, r=biesi, sr=darin


git-svn-id: svn://10.0.0.236/trunk@160112 18797224-902f-48f8-a5cc-f745e15eee43
2004-07-30 05:00:32 +00:00
timeless%mozdev.org
fab9e44286 Bug 241710 nsILocalFile.getRelativeDescriptor(null) crashes
r=dougt


git-svn-id: svn://10.0.0.236/trunk@155632 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-28 12:53:20 +00:00
gerv%gerv.net
210853d71e Bug 236613: change to MPL/LGPL/GPL tri-license.
git-svn-id: svn://10.0.0.236/trunk@155067 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-18 14:21:17 +00:00
darin%meer.net
55688e6410 landing string defragmentation patch for bug 231995, r/sr=dbaron,jst,dougt
git-svn-id: svn://10.0.0.236/trunk@152905 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-19 02:44:03 +00:00
dougt%netscape.com
3ce22699b8 landing 172512. nsEmbedString for component developers and embeders. r=alec, sr=jag/darin, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@132196 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-17 23:41:47 +00:00
dougt%netscape.com
790c5bbc87 Removing silly comment.
git-svn-id: svn://10.0.0.236/trunk@131250 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-06 00:26:20 +00:00
dougt%netscape.com
fe86486377 Fixes bugs 149745 148918 149715 149730 149754 129959. Cleanup of nsIFile and nsILocalFile interfaces, supporting do_GetInterface in embedding via xcom glue, and general cleanup of shutdown. r=various, sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@123042 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:26:04 +00:00
darin%netscape.com
0990c0c6cf freezing nsIFile/nsILocalFile API (b=129279)
r=dougt sr=alecf


git-svn-id: svn://10.0.0.236/trunk@121410 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-13 22:55:29 +00:00
darin%netscape.com
24feadaaed fixes bug 142870 "nsIFile should use UCS-2 instead of UTF-8"
r=dougt sr=alecf


git-svn-id: svn://10.0.0.236/trunk@121010 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 23:07:19 +00:00
darin%netscape.com
224d55f0e9 documentation cleanup for nsIFile/nsILocalFile API changes (no code changes)
git-svn-id: svn://10.0.0.236/trunk@120672 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 06:01:29 +00:00
darin%netscape.com
824def02af fixes bug 129279 "nsIFile unicode/utf8/ascii task"
r=dougt sr=alecf


git-svn-id: svn://10.0.0.236/trunk@120092 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 05:33:09 +00:00
ccarlen%netscape.com
b01ade9e83 Bug 12911 - use relative file descriptors. This adds the needed methods to nsILocalFile. r=dougt/sr=alecf/a=asa/adt=jaime
git-svn-id: svn://10.0.0.236/trunk@118544 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-09 14:12:24 +00:00
brendan%mozilla.org
f5bc62edea FASTLOAD_20010703_BRANCH landing, r=dbaron, sr=shaver.
git-svn-id: svn://10.0.0.236/trunk@100030 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-31 19:05:34 +00:00
valeski%netscape.com
e028f93870 r=rpotts. comment changes only. 48726. adding status to idl files of api rev. ifaces.
git-svn-id: svn://10.0.0.236/trunk@90298 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-24 00:22:18 +00:00
mscott%netscape.com
d36ff4d4a0 Bug #63346 --> add methods for reveal and launch to a local file. Stub implementions for OS/2 and Unix right now.
r=conrad
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@85736 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-30 05:02:48 +00:00
brendan%mozilla.org
86e239c98f Fixes to use atomic rename(2) if possible in nsLocalFile::MoveTo (33098, r=?),
plus a bunch of other fixes and cleanups:

- Fix comment misstatements of fact in nsIFile.idl, improve style slightly.
- Fix typo in comment in nsILocalFile.idl.
- Avoid gratuitous nsCString and nsXPIDLCString copy-constructions, which
  entail malloc'ing, in nsLocalFileUnix.cpp's CopyTo and GetParent methods.
  But do use nsXPIDLCString instead of raw nsMemory::Alloc/Free.
- Get rid of unnecessary mLL_II2L and mLL_L2II macros, use "prlong.h" API only.
  Also use the LL_* macros consistently in case a Unix lacking long long type
  support wants to use this code.
* BTW, the "Date" methods should be renamed to use "Time" instead -- after all
  PRTime is the type, and traditionally "time" refers to the time-number, a
  scalar independent of one's position on the surface of the earth, while
  "date" refers to a struct full of locale-specific information derived from
  time and some "environment" variables such as DST.  Can we rename these
  nsIFile methods before Mozilla 0.9 / Netscape 6?
- Use CHECK_mPath consistently and first, before any assertions relating to
  arguments (which logically come after the 'this' parameter CHECK_mPath is
  making assertions about).
- Use nsCOMPtr for singly-inheriting implementations of XPCOM interfaces, to
  avoid scary-when-scaled 0-refcnt instances from being handled (these all
  got a ref via QI or equivalent soon enough, but you never know).  This also
  removed some naked deletes.
- Canonize all paths copied into mPath to lack trailing slashes, so we don't
  need to strip trailing slashes elsewhere, in higher-frequency methods (you
  set path less often than you get it or a substring of it).
- ssize_t for strlen return values.
- Since shaver used a function pointer to consolidate creat/mkdir logic, but
  didn't fold the necessary close of the new fd returned by non-failing creat
  into the pointed-at function, I did that.
- AppendRelativePath forbids .. as a component (bounded by / or beginning or
  end of string on either side), not just in the middle of fragment (so that
  foo..bar is not an illegal relative pathname -- it should not be).  BTW,
  what the heck is the difference between NS_ERROR_FILE_UNRECOGNIZED_PATH and
  ...INVALID_PATH?
- SetLeafName was overallocating the new pathname buffer by failing to subtract
  the old leafname's length.
- CopyTo was failing to return an NSRESULT_FOR_ERRNO(), it just called that
  macro on a line by itself -- eek!  It also contained redundant if (newFD
  == nsnull) {...} cleanup code, it did a useless PR_GetFileInfo call, and it
  leaked FDs on read or write error.
- Implemented CopyToFollowingLinks as a forwarded call to CopyTo, Unix does
  not support "copying" a symlink via normal file i/o.  Should we instead
  lstat in CopyTo and if a link is the source of the copy, do readlink and
  then symlink?
- Fixed the readlink method (GetTarget) to null-terminate the link string in
  the out parameter (readlink does not do that for you).
- Lots of little nsnull vs. NULL vs. 0, == and != applied to boolean or null
  literals, white-space, indentation, bracing, comment, and sloppy code order
  (e.g., declaring an initialized variable that's not used till after early
  returns) fixes.  Also invert some return logic so that NS_OK is the normal,
  least indented, final return.


git-svn-id: svn://10.0.0.236/trunk@79492 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 00:22:41 +00:00
rayw%netscape.com
d9228441a4 Bug 37275, Changing value of all progids, and changing everywhere a progid
is mentioned to mention a contractid, including in identifiers.

r=warren


git-svn-id: svn://10.0.0.236/trunk@79036 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-13 23:57:52 +00:00
conrad%ingress.com
377de8996f Added Get/SetPersistentDescriptor method. Use this instead of GetPath/InitWithPath.
git-svn-id: svn://10.0.0.236/trunk@74316 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-17 14:57:14 +00:00
dougt%netscape.com
db2c70c95b bug 40750.
Adding followSymlink flag to nsILocalFile.
Adjusting callers.
windows shortcut optimizations.
r=blizzard@mozilla.org.
a=brendan@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@74127 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-12 23:31:31 +00:00
dp%netscape.com
09f87e1345 - Api nsILocalFile::AppendRelativePath() added to interface
- nsILocalFile::Append() returns error uniformly on all platforms if
more than one component of path is being appended.


git-svn-id: svn://10.0.0.236/trunk@68351 18797224-902f-48f8-a5cc-f745e15eee43
2000-05-05 05:47:32 +00:00
ftang%netscape.com
26ddc69606 1. small fix on nsLocalFileCommon.cpp to fix unix warrning
2. add unicode methods to nsIFile/nsILocalFile idl
3. add nsLocalFileCommon.cpp to the unix and window makefile


git-svn-id: svn://10.0.0.236/trunk@66583 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-20 22:53:29 +00:00
dougt%netscape.com
bd62ec42b1 Fixing dll exports for NS_NewLocalFile()
r=dveditz


git-svn-id: svn://10.0.0.236/trunk@59111 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-28 23:35:55 +00:00
dougt%netscape.com
714da09a59 Landing nsIFile.
git-svn-id: svn://10.0.0.236/trunk@58490 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-24 21:28:28 +00:00
dougt%netscape.com
77509d47e0 Adding include of prlink.h to nsILocalFile.idl.
remove a bad semicolon in nsLocalFileWin

above not in build.

Adding an explict include of nsCRT to nsPipe2.cpp

this is in the build, but is trival.


git-svn-id: svn://10.0.0.236/trunk@56352 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-22 04:11:13 +00:00
dougt%netscape.com
da42fa46ee adding a load() command which will allow loading of libraries.
not part of build


git-svn-id: svn://10.0.0.236/trunk@56342 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-22 02:59:01 +00:00
dougt%netscape.com
5e6a51e582 1. First cut of a Special System Directory replacement (nsDirectoryService).
It is a nsIProperty.

2. Updates to the nsIFile and nsILocalFile interfaces based on conversations
   with warren. (thanks)

3. Updated windows mac and unix implementations based on interface changes.
   Mac and windows changes need to be reviewed.


                          Not part of build.


git-svn-id: svn://10.0.0.236/trunk@56336 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-22 01:56:45 +00:00
dougt%netscape.com
b7a4eda34c First cut.
These are the local file init methods for a nsIFile.

not hooked up to the build


git-svn-id: svn://10.0.0.236/trunk@55050 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-02 07:45:12 +00:00