3

I am working through some code samples on MSDN that is suppose to return Checked Out files but my tests is showing a problem.

Here you can see that both "default" and "foo" in my Page library are checked out yet only "foo" is returned when I call IList files = library.CheckedOutFiles;

Is there something unique about "default" that makes it not return?

Thanks for reading.

enter image description here

3

The problem is that SPDocumentLibrary.CheckedOutFiles returns the *new*ly uploaded files that are checked out. (notice the new near the foo document).

From MSDN:

When someone creates a new file or adds a new file to a library that requires check-out...

So when using SPDocumentLibrary.CheckedOutFiles you will not have all checked out files.

You can have more information on this subject and on how to get all checked out files from here.

  • 3
    To take this one step further I believe its not just "new" documents. I believe it to be any documents that have no checked in version. – SpartanDonut Feb 8 '12 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.